Virtualenvwrapper does not initialize after updating Python to 3.6

旧巷老猫 提交于 2019-12-24 07:57:43

问题


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:


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


来源:https://stackoverflow.com/questions/41639848/virtualenvwrapper-does-not-initialize-after-updating-python-to-3-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!