简体   繁体   中英

Virtualenvwrapper python bash error

-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.

I get this error when I run tmux in bash. I'm not sure what this affect but I think it has something to do with the wrong path to python in my bashrc. I checked my bashrc and it has this at the end, so it matches the error message. I'm not really sure how to fix this, and I've tried reinstalling python with Anaconda.

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

-bash: /usr/local/bin/python: No such file or directory

seems to be looking at a directory different that you are using.

Try changing VIRTUALENVWRAPPER to

export VIRTUALENVWRAPPER_PYTHON=/home/clu/anaconda3/bin/python

If you don't actually have virtualenwrapper installed, you might need to install it.

pip install virtualenv virtualenvwrapper

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM