python - Python 3 中的 FastCGI WSGI 库?

标签 python python-3.x fastcgi wsgi

对于 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

安装它
./pip install flup6

关于python - Python 3 中的 FastCGI WSGI 库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23482357/

相关文章:

python-3.x - 为什么我得到 "IndentationError: expected an indented block"

django - 使用Nginx/Fastcgi在子URL下部署django

php - PHP 上的 FastCGI 错误 500

php并发请求卡住?

python - 使用 NLP 从文本中提取关联值

python - Matplotlib set_xticklabels 未对齐

python-3.x - 在 python 3x 中创建以 0 开头的随机数

python - 如何使用 python 读取微秒精度的 mysql 日期时间字段

python - TensorFlow TypeError : Fetch argument None has invalid type <type 'NoneType' >?

python - 通过 python 自动化 .get 请求