ml-powered-applications
ml-powered-applications copied to clipboard
can't run FLASK_APP=app.py flask run
Try 'flask run --help' for help.
Error: While importing 'app', an ImportError was raised:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 218, in locate_app
import(module_name)
File "/Users/xingvoong/github/ml-study/ml-powered-applications/app.py", line 5, in
I already install pyphen.
At a glance, this sounds like an environment issue, I'd try two things.
Double check that pyphen is actually installed. Open a Python shell and try import pyphen
. If it fails here, then it is not installed properly. Reinstall it with pip install pyphen
.
If pyphen is installed, make sure it is installed in the same environment/Python installation that you are using to run the Flask app. For example if you installed pyphen in a virtualenv or conda environment, make sure to activate that environment before running flask run.
Let me know if this fixed your issue