Error while finding spec for 'virtualenvwrapper.hook_loader' 解决方案

在Ubuntu16.04中将python3设置为默认环境后,打开终端出现了如下错误:

/usr/bin/python: Error while finding spec for 'virtualenvwrapper.hook_loader' (<class 'ImportError'>: 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.

依次执行以下命令:

sudo apt-get install python3-pip
sudo pip3 install virtualenv virtualenvwrapper
source .bashrc 

即可解决。

猜你喜欢

转载自blog.csdn.net/weixin_42259631/article/details/82423213