将 Python 更新到 3.6 后,Virtualenvwrapper 未初始化 [英] Virtualenvwrapper does not initialize after updating Python to 3.6

查看:50
本文介绍了将 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.

此外我得到这些输出

$ 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 未初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆