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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章