我正在尝试从一个管道文件安装需求,但是当我输入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目录不存在。我无法执行pipenv。
python --version返回Python 3.6.6。我用pyenv管理我所有版本的python。
这是我所有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.6pipenv是通过pipsi安装的。此错误似乎与Pipfile无关。我一定是在某个地方配置了不正确的路径。
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发布于 2020-09-09 01:51:24
在Mac上,我通过这样做解决了这个问题
brew install --force pipenv
然后
brew link --overwrite pipenv
执行重新安装。
发布于 2020-11-27 10:41:15
原来我的mac上有两个版本的pipenv。我卸载了这两个软件,然后用brew重新安装。瞧!
pip3 uninstall pipenv
brew uninstall pipenv
brew install pipenv现在一切都正常了。
https://stackoverflow.com/questions/55499356
复制相似问题