问题
windows下使用gunicorn,运行Flask项目,报错
原因
看下官网的介绍:
可以看到,它仅支持UNIX
, 不支持windows
解决
我们可以使用waitress
来替换Gunicorn
Waitress - A WSGI server for Python 2 and 3
文档
- https://docs.pylonsproject.org/projects/waitress/en/stable/index.html
- https://github.com/Pylons/waitress
这样就可以正常启动了
参考
https://stackoverflow.com/questions/45228395/error-no-module-named-fcntl