Ubuntu安装虚拟环境-bash-usrbinpython-No-such-file-or-directory
目录
Ubuntu安装虚拟环境-bash: /usr/bin/python: No such file or directory
Ubuntu安装虚拟环境-bash: /usr/bin/python: No such file or directory
出现报错
root@dev1:~# source .bashrc
-bash: /usr/bin/python: 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/bin/python and that PATH is
set properly.
root@dev1:~# cd /usr/lib/python3
root@dev1:/usr/lib/python3# ls
加上这两句话
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
重新source .bashrc即可