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

北战南征 提交于 2019-12-01 20:33:11

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

It worked for me finally

pip install -U flask-cors

If you are running your python script as sudo, then...

sudo pip install -U flask-cors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!