升级到OSX小牛之后,我在终端上收到以下消息:
/usr/bin/python: No module named virtualenvwrapper
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenv has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.发布于 2019-05-22 10:33:36
您只需要正确地配置路径。在终端中运行以下命令:
which python产出-
/usr/bin/pythonwhich virtualenvwrapper.sh产出-
/usr/local/bin/virtualenvwrapper.shecho $VIRTUALENVWRAPPER_PYTHON
/usr/local/bin/python因此,您可以看到变量$VIRTUALENVWRAPPER_PYTHON指向错误的python。因此,我们需要重置变量$VIRTUALENVWRAPPER_PYTHON的路径。
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python现在运行以下命令:
source /usr/local/bin/virtualenvwrapper.sh https://stackoverflow.com/questions/19549824
复制相似问题