No module named virtualenvwrapper virtualenvwrapper.sh: There was a problem running the initializat

No module named virtualenvwrapper virtualenvwrapper.sh: There was a problem running the initializat,第1张

No module named virtualenvwrapper virtualenvwrapper.sh: There was a problem running the initializat
# 1、安装包
$ pip3 install virtualenv virtualenvwrapper 
# 2、查找位置
$ sudo find / -name virtualenvwrapper.sh  
# 3、设置变量
$ sudo vim /etc/profile  
# 4、将下边两行加入到profile中
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
# 5、重新加载配置
$ source /etc/profile

可能出现的错误:
/usr/bin/python: 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.

解决办法:

vim /usr/local/bin/virtualenvwrapper.sh    加入红色部位

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5664954.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存