0
votes

A few months back, I was trying to download a virtualenvwrapper but I ended up setting up the wrong path

So whenever I launch my terminal the following problem appears:

Last login: Sat Apr 20 23:57:08 on ttys000
-bash: /usr/local/bin/python2: 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/python2 and that PATH is set properly.

-bash: /usr/local/bin/python2: 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/python2 and that PATH is set properly.

-bash: /usr/local/bin/python2: 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/python2 and that PATH is set properly.

Could anyone please recommend what terminal commands I have to give in order to eliminate this?

1

1 Answers

1
votes

You need to set the correct environment variables in your ~/.bashrc file (or equivalent, if you use a different shell).

My .bashrc has these values:

# virtualenv(wrapper)
export WORKON_HOME=${HOME}/virtual-envs

export PROJECT_HOME=${HOME}/python_projects

source /usr/bin/virtualenvwrapper.sh