我目前正在使用mac,每当我启动终端时,它将显示如下代码。我尝试了所有的方法在堆栈溢出,但它没有工作,所以我张贴我自己的。请帮我解决这个问题,我曾经尝试过“sudoapt-getinstallpython3-pip”或"sudo pip3 install“。它们都安装好了
消息
Last login: Tue Aug 18 22:33:59 on ttys000
virtualenvwrapper_run_hook:12: no such file or directory: /usr/local/bin/python3
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3 and that PATH is
set properly.
哪个python命令
/usr/bin/python
Python版本命令
Python 2.7.16
,python3命令
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
Python version3命令
Python 3.7.4
pip3 --版本命令
pip 19.3.1 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)
发布于 2021-01-04 23:25:48
看起来您的Virtualenv/Virtualenvwrapper安装失败了(发生了!)如果您不知道这是什么/意味着什么,最简单的方法就是查看主目录中的dotfiles,确定您选择的shell (例如.zshrc
、.profile
、.bashrc
等)运行的是哪些文件,并注释掉(或删除)以virtualenvwrapper.sh
结尾的行。
https://stackoverflow.com/questions/63471240
复制相似问题