Search code examples
pythonvirtualenvvirtualenvwrapper

/usr/bin/python3: Error while finding spec for 'virtualenvwrapper.hook_loader' (<class 'ImportError'>: No module named 'virtualenvwrapper')


I'm trying to follow How To Serve Django Applications with uWSGI and Nginx on Ubuntu 14.04 and I'm failing at the very earlier stage, due to amount of output, I placed all related information into Pastebin.com - #1 paste tool since 2002!.

the actual error:

root@alexus:~# echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc
root@alexus:~# source ~/.bashrc
/usr/bin/python3: Error while finding spec for 'virtualenvwrapper.hook_loader' (<class '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.
root@alexus:~#

I'm following how to to the teeth, what am I doing wrong?


Solution

  • Thanks to @Alexander, I was able to fix my issue by changing the line in ~/.bashrc:

    export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
    

    to

    export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
    

    due to backwards compatibility.