How to investigate the problem of "No module named 'flask_cors'"?
yubrshen opened this issue · 1 comments
yubrshen commented
Right after setting up per the instruction, in the same terminal of setting up, when executing
flask run --port 8000
I got the following error:
File "/home/yshen/dev/whisper-playground/backend/app.py", line 5, in <module>
from flask_cors import CORS
ModuleNotFoundError: No module named 'flask_cors'
but when I execute import flask_cors
in python interactive session, it worked.
(venv) yshen@ys-private:~/dev/whisper-playground/backend$ python
Python 3.10.8 (main, Nov 24 2022, 14:13:03) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import flask_cors
>>>
How should I investigate the problem?
yubrshen commented
My problem is solved by opening a new terminal and activating the venv environment.