Python flask-cors ImportError: No module named 'flask-cors' Raspberry pi Python flask-cors ImportError: No module named 'flask-cors' Raspberry pi flask flask

Python flask-cors ImportError: No module named 'flask-cors' Raspberry pi


It worked for me finally

pip install -U flask-cors


If you import sys and print(sys.path), this will show you where your available packages are installed.

In the event that pip installed flask_cors outside of one of these directories, you should move the file to one of the directories or you can sys.path.append(<your path to flask_cors>).

To prevent pip from installing into a bad directory, I would recommend this answer


I spent a day trying to resolve this. Here are my steps:First i closed my VSCODE and open it again, then run

pip uninstall flaskpip uninstall flask_corspip3 install flaskpipenv shellpipenv install flask_corspip install pipreqsgit add .git commit -am "New cor resolved"git push heroku master