Shu*_*ngh 9 python flask gunicorn server
用于使用 gunicorn 运行的烧瓶应用程序
$ pip install gunicorn
$ gunicorn --bind 0.0.0.0:8000 app:app
Run Code Online (Sandbox Code Playgroud)
出错
回溯(最近一次调用):文件“C:\Users\shubham\AppData\Local\Programs\Python\Python37\lib\runpy.py”,第 193 行,在 _run_module_as_main “ main ”,mod_spec)文件“C:\ Users\shubham\AppData\Local\Programs\Python\Python37\lib\runpy.py”,第 85 行,在run_code exec(code, run_globals) 文件“C:\Users\shubham\Desktop\Full_stack_developer\venv\Scripts\gunicorn .exe_主.py”,第 5 行,在文件“c:\users\shubham\desktop\full_stack_developer\venv\lib\site-packages\gunicorn\app\wsgiapp.py”中,第 9 行,来自 gunicorn.app.base 导入应用程序文件“c:\users\shubham\desktop\full_stack_developer\venv\lib\site-packages\gunicorn\app\base.py”,第 11 行,来自 gunicorn 导入 util 文件“c:\users\shubham\desktop\full_stack_developer \venv\lib\site-packages\gunicorn\util.py”,第 9 行,在 import fcntl ModuleNotFoundError: No module named 'fcntl'
Nec*_*don 16
模块 fctnl 在 Windows 系统上不可用
它已经在/sf/answers/776144421/(感谢@Necklondon)中提到,但复制到这里,因为它很有用:
pip install waitress
waitress-serve --listen=*:8000 app:app
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15859 次 |
| 最近记录: |