本文介绍了将Python更新到3.6后,Virtualenvwrapper无法初始化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的操作系统(Arch Linux)最近将Python从3.5.2更新到了3.6.0,现在在运行任何终端时,我都会收到以下消息:
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?
谢谢.
推荐答案
此文章对于解决这种情况非常有用,只需要运行即可:
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
这篇关于将Python更新到3.6后,Virtualenvwrapper无法初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!