Virtualenvwrapper does not initialize after updati

2019-08-05 17:02发布

My OS (Arch Linux) recently updated Python from 3.5.2 to 3.6.0, now when running any terminal I get this message:

/usr/bin/python: Error while finding module specification for 'virtualenvwrapper.hook_loader' (ModuleNotFoundError: 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.

Moreover I get these outputs

$ whereis python
python: /usr/bin/python3.6 /usr/bin/python3.6m /usr/bin/python3.6-config /usr/bin/python3.6m-config /usr/bin/python2.7-config /usr/bin/python /usr/bin/python2.7 /usr/lib/python3.6 /usr/lib/python3.5 /usr/lib/python2.7 /usr/include/python3.6m /usr/include/python2.7 /usr/share/man/man1/python.1.gz

$ which python
/usr/bin/python

$ python --version
Python 3.6.0

How can I fix this situation? Will this situation will have any impact on my created virtual envs or other programs?

Thanks in advance.

1条回答
闹够了就滚
2楼-- · 2019-08-05 17:27

This article was very useful to solve the situation, only you need is to run:

$ sudo pip3.6 install -U pip
$ sudo pip3.6 install -U virtualenvwrapper
查看更多
登录 后发表回答