No module named inside virtualenv

I am using Python virtualenv and I have a problem with a module (installed inside virtualenv).

First of all, I activate virtualenv:

source path_to_virtualenv/bin/activate

      

The virtual virtual machine is correctly activated (its name is displayed in the shell). Inside this virtual one I have installed mininet (network simulator): I am sure that it is installed correctly (it is specified by the command pip list

).

However, when I try to run my application, I get the following error above the Mininet API module:

from mininet.net import Mininet ImportError: No module named net

How is this possible? Using the IDE, it correctly detects all Mininet modules (in the same virtual one); does anyone have any ideas?

thank

+3


source to share


1 answer


Make sure your project is in the same directory as your virtual environment.

Unless you start your virtual env. at the command line and then cd for the project.



hope this helps a little

0


source







All Articles