Reputation: 92
i have a problem, if you have any idea how it may be fixed, please help)
I have a project, which run by the .sh file, and this .sh refers to a python file.py which uses the Flask for html-reports.
When i run the file.py (for simplify with 'hello world'), but when i run the .sh file, it writes the error "ImportError: No module named 'flask'".
I installed the virtualenv for file.py's folder and .sh folder.
Please, give an advice for fix it. Thank's.
Upvotes: 0
Views: 1189
Reputation: 92
Installing wheel using:
pip install wheel
works, not sure what influenced it.
Upvotes: 0
Reputation: 4537
try:
pip install flask
or
pip3 install flask
the flask is the required module.
Upvotes: 1
Reputation: 6073
You need to activate the virtualenv
first. In Linux you can do the following:
. env/bin/activate
Or:
source env/bin/activate
Where env
is where you initialized your virtualenv.
Then you can run you shell script.
As it has already been mentioned - if you haven't installed Flask install it after you have activated the virtualenv:
pip install flask
Upvotes: 1