Article 53EJV Python virtualenvwrapper

Python virtualenvwrapper

by
Pedroski
from LinuxQuestions.org on (#53EJV)
I am reading a book called Python Automation Cookbook.

First thing it mentions is getting a virtual environment set up.

I installed Python virtualenvwrapper

But I am getting this message when I start Ubuntu and when I start bash:

Quote:
/usr/bin/python: 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/python and that PATH is
set properly.
I have installed virtualenvwrapper:

Quote:
pedro@pedro-512ssd:~$ pip3 install virtualenvwrapper
In /home/pedro/.local/bin/ I have virtualenvwrapper.sh, virtualenv and virtualenvwrapper_lazy.sh

What should I do to set the path right?

In /home/pedro/.profle I followed the instructions to add this:

Quote:
export WORKON_HOME=~/.virtualenvs
source /home/pedro/.local/bin/virtualenvwrapper.sh
But I am still getting the error message. What should I do??

The virtual environment seems to be working:

Quote:
pedro@pedro-512ssd:~$ source .virtualenvs/automation_cookbook/bin/activate
(automation_cookbook) pedro@pedro-512ssd:~$
latest?d=yIl2AUoC8zA latest?i=v6L5ODRnXAk:KmKrK6yVRtQ:F7zBnMy latest?i=v6L5ODRnXAk:KmKrK6yVRtQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=v6L5ODRnXAk:KmKrK6yVRtQ:gIN9vFwv6L5ODRnXAk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments