我下面就的virtualenv本指南Python和遇到了一个小问题:如何检查virtualenvwrapper已经安装VIRTUALENVWRAPPER_PYTHON =的/ usr/bin中/蟒蛇等
Sahands-MBP:empty sahandzarrinkoub$ source /usr/local/bin/virtualenvwrapper.sh
/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 virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.
打印输出是相当很有帮助。它说我需要检查virtualenvwrapper已安装为VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
,并且PATH
已正确设置。唯一的问题是,我不知道这些是什么意思。所以我的问题是:
- 这是什么意思,virtualenvwrapper已被“安装”
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
。 - 什么是在这种情况下正确设置
PATH
?
非常感谢。我通过将我的VIRTUALENVWRAPPER_PYTHON变量指向安装了virtualenvwrapper的python版本(python3)来解决我的问题。所以,我将这一行添加到我的.bash_profile中: 'export VIRTUALENVWRAPPER_PYTHON =/usr/local/bin/python3' – Sahand