[英]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.