On a fresh install of 16.04, I am trying to install virtualenvwrapper by following this great answer by Gerhard Burger.
after configuring the .bashrc
, whenever opening the terminal displays
bash: /usr/local/bin/python2.7: 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.7 and that PATH is
set properly.
the script location is,
$ sudo find / -name virtualenvwrapper.sh
[sudo] password for john:
/usr/local/bin/virtualenvwrapper.sh
contents of my .bashrc
are,
export WORKON_HOME=/home/john/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=/home/john/.virtualenvs
here is my pip freeze
cffi==1.5.2
greenlet==0.4.9
pbr==1.10.0
readline==6.2.4.1
six==1.10.0
stevedore==1.15.0
virtualenv==15.0.2
virtualenv-clone==0.2.6
virtualenvwrapper==4.7.1
the python interpreter's location,
$ which python
/usr/bin/python
How do I make it work?
thank you.
/usr/local/bin
indeed doesn't containpython2.7
, and I suspect yours doesn't either.which python2.7
says/usr/bin/python2.7
, but I have not yet figured out how to tellvirtualenvwrapper
to look in/usr/bin
instead of/usr/local/bin
. – edwinksl Jun 11 '16 at 08:04export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
to your.bashrc
beforesource /usr/local/bin/virtualenvwrapper.sh
? – edwinksl Jun 11 '16 at 08:18export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
beforesource /usr/local/bin/virtualenvwrapper.sh
? – edwinksl Jun 11 '16 at 08:27`/usr/bin/python3: Error while finding spec for 'virtualenvwrapper.hook_loader' (ImportError: No module named 'virtualenvwrapper') 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/python3 and that PATH is set properly. `
– bit_scientist Mar 08 '17 at 03:37