小编All*_*ітy的帖子

运行初始化挂钩的 Python virtualenvwrapper 问题

在 16.04 的全新安装中,我尝试按照Gerhard Burger 的这个很棒的答案来安装 virtualenvwrapper 。

配置好后.bashrc,每次打开终端都会显示

bash: /usr/local/bin/python2.7: No such file or directory
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/local/bin/python2.7 and that PATH is
set properly.
Run Code Online (Sandbox Code Playgroud)

脚本位置是,

$ sudo find / -name virtualenvwrapper.sh
[sudo] password for john: 
/usr/local/bin/virtualenvwrapper.sh
Run Code Online (Sandbox Code Playgroud)

我的内容.bashrc是,

export WORKON_HOME=/home/john/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=/home/john/.virtualenvs
Run Code Online (Sandbox Code Playgroud)

这是我的 pip freeze

cffi==1.5.2
greenlet==0.4.9
pbr==1.10.0
readline==6.2.4.1
six==1.10.0
stevedore==1.15.0 …
Run Code Online (Sandbox Code Playgroud)

python bash virtualenv virtualenvwrapper 16.04

17
推荐指数
3
解决办法
3万
查看次数

标签 统计

16.04 ×1

bash ×1

python ×1

virtualenv ×1

virtualenvwrapper ×1