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即可