I have a problem with virtualenv. I use it regulary, I use it on my development machine and on several servers. But on this last server I tried to use i got a problem.
I created a virtualenv with the --no-site-packages argument, and then I installed some python modules inside the virtualenv. I can confirm that the modules is located inside the virtualenvs site-packages and everything seems to be fine.
But when i try to do:source virtualenv/bin/activate
and then import one of the module python import modulename
i get an import error that says that the module doesnt exist. How is it that this is happending? It seems like it never activates even thoug that it says it do.
Anybody have a clue on how to fix this?
Activating a virtual environmentAs long as your virtual environment is activated pip will install packages into that specific environment and you'll be able to import and use packages in your Python application.
After activating the virtual env, try:
$ python
>>> import sys
>>> sys.executable
...
... and see if you are running the expected executable.
Also check:
>>> sys.path
[...]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With