简体   繁体   English

Pipenv 错误“错误的解释器:没有这样的文件或目录”

[英]Pipenv error "bad interpreter: No such file or directory"

I am trying to install requirements from a pipfile however when I type pipenv and press enter, i receive this error message -bash: /Users/jkelly/.local/bin/pipenv: /usr/local/Cellar/python/3.7.0/bin/python3.7: bad interpreter: No such file or directory This python directory doesn't exist.我正在尝试从 pipfile 安装需求,但是当我输入pipenv并按 Enter 时,我收到此错误消息-bash: /Users/jkelly/.local/bin/pipenv: /usr/local/Cellar/python/3.7.0/bin/python3.7: bad interpreter: No such file or directory这个python目录不存在。 I am unable to execute pipenv.我无法执行 pipenv。

python --version returns Python 3.6.6 . python --version返回Python 3.6.6 I manage all my versions of python with pyenv.我使用 pyenv 管理我所有版本的 python。

This is a complete list of all of my pyenv shims这是我所有 pyenv 垫片的完整列表

/Users/jkelly/.pyenv/shims/2to3
/Users/jkelly/.pyenv/shims/2to3-3.6
/Users/jkelly/.pyenv/shims/easy_install
/Users/jkelly/.pyenv/shims/easy_install-3.6
/Users/jkelly/.pyenv/shims/idle
/Users/jkelly/.pyenv/shims/idle3
/Users/jkelly/.pyenv/shims/idle3.6
/Users/jkelly/.pyenv/shims/pip
/Users/jkelly/.pyenv/shims/pip3
/Users/jkelly/.pyenv/shims/pip3.6
/Users/jkelly/.pyenv/shims/pydoc
/Users/jkelly/.pyenv/shims/pydoc3
/Users/jkelly/.pyenv/shims/pydoc3.6
/Users/jkelly/.pyenv/shims/python
/Users/jkelly/.pyenv/shims/python-config
/Users/jkelly/.pyenv/shims/python3
/Users/jkelly/.pyenv/shims/python3-config
/Users/jkelly/.pyenv/shims/python3.6
/Users/jkelly/.pyenv/shims/python3.6-config
/Users/jkelly/.pyenv/shims/python3.6m
/Users/jkelly/.pyenv/shims/python3.6m-config
/Users/jkelly/.pyenv/shims/pyvenv
/Users/jkelly/.pyenv/shims/pyvenv-3.6

pipenv is installed via pipsi. pipenv 是通过 pipi 安装的。 This error seems to have nothing to do with the Pipfile.这个错误似乎与 Pipfile 无关。 I must have an improperly configured path somewhere.我必须在某处有一个配置不正确的路径。

export PATH=/Users/jkelly/.local/bin:$PATH
export PYENV_SHELL=bash
eval "$(pyenv init -)"
export PATH="/usr/local/opt/mongodb@3.6/bin:$PATH"
export PATH="/usr/local/opt/node@6/bin:$PATH"
export PATH="/usr/local/opt/gettext/bin:$PATH"

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

On Mac OSX, I solved this by doing在 Mac OSX 上,我解决了这个问题

brew install --force pipenv

then然后

brew link --overwrite pipenv

to do a reinstall.重新安装。

Turns out I had two versions of pipenv on my mac.原来我的 mac 上有两个版本的 pipenv。 I uninstalled both and re-installed with brew.我卸载了两者并重新安装了 brew。 Voila!瞧!

pip3 uninstall pipenv
brew uninstall pipenv
brew install pipenv

Now everything works fine.现在一切正常。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 pipenv 安装错误:错误的解释器:没有这样的文件或目录 - pipenv install error: bad interpreter: No such file or directory 运行 pipenv, mkdocs 时出错:/usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory - Error running pipenv, mkdocs : /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory virtualenv 错误解释器错误:没有这样的文件或目录 - virtualenv error bad interpreter: No such file or directory 错误的解释器:没有这样的文件或目录 - Bad interpreter: No such file or directory zsh:/usr/local/bin/pipenv:错误的解释器:/usr/local/opt/python/bin/python3.7:没有这样的文件或目录 - zsh: /usr/local/bin/pipenv: bad interpreter: /usr/local/opt/python/bin/python3.7: no such file or directory 启动 jupyter notebook 时出现 bash 错误 - 错误的解释器:没有这样的文件或目录 - bash error when launching jupyter notebook - bad interpreter: No such file or directory conda 命令会提示错误:“Bad Interpreter: No such file or directory” - conda command will prompt error: “Bad Interpreter: No such file or directory” AWS 抛出以下错误:“错误的解释器:没有这样的文件或目录” - AWS throws the following error: "bad interpreter: No such file or directory" IPython 3.5 返回“错误的解释器:没有这样的文件或目录” - IPython 3.5 returns “bad interpreter: No such file or directory” 错误的解释器:运行 pip 时没有这样的文件或目录 - bad interpreter: No such file or directory when running pip
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM