|
14精币
各位大佬,最近我在学习Python里的flask框架,但是用Pycharm新创建的框架啥都没动控制台老报错,但是能运行起来,请问下这个报错到底啥意思啊?百du了一圈也没看懂!
F:\ENV\Python\python.exe "F:/IDE/PyCharm 2024.2.3/plugins/python-ce/helpers/pydev/pydevconsole.py" --mode=client --host=127.0.0.1 --port=54340
import sys
sys.path.extend(['D:\\phpStudy\\WWW\\Verify_Project_new\\flaskProject', 'F:/IDE/PyCharm 2024.2.3/plugins/python-ce/helpers/pycharm', 'F:/IDE/PyCharm 2024.2.3/plugins/python-ce/helpers/pydev'])
from flask.cli import ScriptInfo
locals().update(ScriptInfo(create_app=None).load_app().make_shell_context())
print("Python %s on %s\nApp: %s [%s]\nInstance: %s" % (sys.version, sys.platform, app.import_name, app.env, app.instance_path))
PyDev console: starting.
Traceback (most recent call last):
File "F:\IDE\PyCharm 2024.2.3\plugins\python-ce\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
^^^^^^
File "<input>", line 6, in <module>
File "F:\ENV\Python\Lib\site-packages\flask\cli.py", line 353, in load_app
app = locate_app(import_name, None, raise_if_not_found=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\ENV\Python\Lib\site-packages\flask\cli.py", line 250, in locate_app
raise NoAppException(
flask.cli.NoAppException: While importing 'wsgi', an ImportError was raised:
Traceback (most recent call last):
File "F:\ENV\Python\Lib\site-packages\flask\cli.py", line 245, in locate_app
__import__(module_name)
File "F:\IDE\PyCharm 2024.2.3\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'wsgi'
以上是错误信息
|
最佳答案
查看完整内容
pip install wsgi 。 安装这个库
补充内容 (2024-12-4 22:46):
应该是uwsgi
|