Django虚拟环境创建问题virtualenvwrapper.sh: There was a problem running the initialization hooks.

virtualenvwrapper.sh: There was a problem running the initialization hooks.

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= and that PATH is set properly.错误
1、在ubuntu中安装虚拟环境时,刷新.basnrc时出现上述错误。

Django虚拟环境创建问题virtualenvwrapper.sh: There was a problem running the initialization hooks.

 

 

这是因为ubuntu安装了只有3.x版本的python,在安装时使用的是sudo pip3 install
virtualenvwrapper在我运行的时候默认使用的是python2.x,但在python2.x中不存在对应的模块。

2、修改virtualenvwrapper.sh文件,将框内的python改为python3。

sudo gedit /usr/local/bin/virtualenvwrapper.sh

Django虚拟环境创建问题virtualenvwrapper.sh: There was a problem running the initialization hooks.

改成python3

 Django虚拟环境创建问题virtualenvwrapper.sh: There was a problem running the initialization hooks.

 

 

3、重新刷新家目录下的.bashrc。

source .bashrc

4、成功解决。

Django虚拟环境创建问题virtualenvwrapper.sh: There was a problem running the initialization hooks.

 

Django虚拟环境创建问题virtualenvwrapper.sh: There was a problem running the initialization hooks.

上一篇:appium环境搭建及命令行启动sdk模拟器-附踩坑以及解决过程


下一篇:ElemtnUI 和IOS 10中 Dialog被蒙版遮住