I have a one-line script in my project which imports a package (flask_mail). I'm running it in virtualenv. If I execute python script.py
I get ImportError: No module named flask_mail
. If in the same folder, with the same virtualenv activated I open the python console and run the same command from my script.py
file (import flask_mail
) I get no errors whatsoever.
Virtualenv was created with the following command: virtualenv venv
and then activated source venv/bin/activate
What am I doing wrong here?