Char
Char

Reputation: 1735

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

Upvotes: 0

Views: 2263

Answers (1)

Fred
Fred

Reputation: 583

-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

Upvotes: 1

Related Questions