Skip to content Skip to sidebar Skip to footer

Python Can't Find My Flask Script Under Virtualenv

I'm trying to build a simple API server using Flask that will validate and store international phone numbers using this phonenumbers.py. I previously installed Flask and several F

Solution 1:

Install Flask_script in your virtual env using

$pip install Flask-Script

Solution 2:

Make sure that you activated the virtualenv before you installed Flask and your other dependencies -

$ virtualenv env$ sourceenv/bin/activate$ pip install flask

Then when you're done working, make sure to deactivate the environment -

$ deactivate

Finally, when you want to start working again, navigate to your project directory and reactivate the environment -

$ sourceenv/bin/activate

At this point, I would just remove the virtualenv and start over.

Hope that helps!

Post a Comment for "Python Can't Find My Flask Script Under Virtualenv"