2017-04-16 66 views
0
-bash: /usr/local/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/local/bin/python and that PATH is 
set properly. 

我在bash中運行tmux時出現此錯誤。我不確定這會產生什麼影響,但我認爲它與我的bashrc中python的錯誤路徑有關。我檢查了我的bashrc,它在最後有這個,所以它匹配錯誤消息。我真的不知道如何解決這個問題,我試過用Anaconda重新安裝python。Virtualenvwrapper python bash error

# virtualenv and virtualenvwrapper 
export WORKON_HOME=/home/clu/.virtualenvs 
source /usr/local/bin/virtualenvwrapper.sh 
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python 
+0

是python在那裏安裝的嗎? '哪個python'給你什麼路徑? – Fred

+0

哪個python給我/ home/clu/anaconda3/bin/python – Char

回答

0

-bash:在/ usr/local/bin目錄/ Python的:沒有這樣的文件或目錄

似乎在尋找不同的您正在使用的目錄。

嘗試改變VIRTUALENVWRAPPER

出口VIRTUALENVWRAPPER_PYTHON = /家庭/ CLU/anaconda3 /斌/ Python的

如果你實際上並沒有virtualenwrapper安裝,您可能需要安裝它。

pip install virtualenv virtualenvwrapper