打开终端时,它显示“ / usr / bin / python:没有名为virtualenvwrapper的模块...”

时间:2019-10-12 04:01:49

标签: bash virtualenv

每次打开终端时,都会显示

/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.

但是当输入lsvirtualenv时,结果将显示

my_virtual_env1
my_virtual_env2
my_virtual_env3

输入workon my_virtual_env1时,结果显示

/usr/bin/python: No module named virtualenvwrapper
/usr/bin/python: No module named virtualenvwrapper

但是虚拟环境仍然可以打开,

(my_virtual_env1)me%

尽管它可以工作,但很烦人。我已经通过很多方法解决了该问题,例如更改了bash_file或重新安装了virtualenvwrapper,但是它不起作用。有什么建议吗?

>> which python
/usr/bin/python
>> which virtualenvwrapper.sh
/usr/local/bin/virtualenvwrapper.sh

我的bash_profile

# Homebrew
export PATH=/usr/local/bin:$PATH

# virtualenv and virtualenvwrapper
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
source /usr/local/bin/virtualenvwrapper.sh

我还应该怎么做才能使我不再看到这个?

0 个答案:

没有答案