对于Python 3,是否存在可以将WSGI应用程序用作FastCGI服务器的库?(这样nginx就可以将请求代理给它?)
The Python 3 docs提到了flup,但是flup甚至没有在Python 3中安装:
% env3/bin/pip install flup Downloading/unpacking flup Downloading flup-1.0.2.tar.gz (49kB): 49kB downloaded Running setup.py (path:/Users/me/tmp/env3/build/flup/setup.py) egg_info for package flup Traceback (most recent call last): File "", line 17, in File "/Users/me/tmp/env3/build/flup/setup.py", line 2, in from ez_setup import use_setuptools File "./ez_setup.py", line 98 except pkg_resources.VersionConflict, e: ^ SyntaxError: invalid syntax Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 17, in File "/Users/me/tmp/env3/build/flup/setup.py", line 2, in from ez_setup import use_setuptools File "./ez_setup.py", line 98 except pkg_resources.VersionConflict, e: ^ SyntaxError: invalid syntax ---------------------------------------- Cleaning up... Command python setup.py egg_info failed with error code 1 in [snip] Storing debug log for failure in [snip]
现在有一个名为
flup6
的模块。使用pip
安装您可以使用flipflop。它是一个简化的flup分支(只包含FastCGI部分),可以与Python 3一起使用。
您可以使用
flup-py3
来解决此问题,如下所示:pip3 install flup-py3
您可能需要超级用户权限才能执行此命令。
相关问题 更多 >
编程相关推荐