When I connected with Heroku at the stage of creating LINEbot for the first time in a long time, I got the following error.
ModuleNotFoundError: No module named 'flask'
There are many errors of this hand No module named'XXX', and I checked and solved it every time, but as my solution that is troublesome
This turned out to be easy after all (it doesn't seem to be the ultimate solution)
Therefore, perform the following operations on the terminal. (I'm doing it with flask as an example) First, check if the module is installed.
On the terminal
(base) MacBook-puro:*********$ pip show flask
Name: Flask
Version: 1.1.1
Summary: A simple framework for building complex web applications.
Home-page: https://palletsprojects.com/p/flask/
Author: Armin Ronacher
Author-email: [email protected]
License: BSD-3-Clause
Location: /Users/***(username)/opt/anaconda3/lib/python3.7/site-packages
Requires: itsdangerous, Jinja2, click, Werkzeug
Required-by: flask-ngrok, Flask-Compress, dash
If it is displayed like this, you can see that the module itself is included. Officially, the setting from Location is correct, but here I will delete the module and reinsert it.
#Erase and reinsert
pip uninstall flask && python -m pip install flask
This often returns. I think the reason is the location of the path and the version change. I hope you can see other people's articles for the fundamental solution.
Recommended Posts