简体   繁体   English

如何将py_wsgi作为python安装到python安装中?

[英]How to install mod_wsgi as a python into python installation?

I am unable install mod_wsgi on windows, when I am trying to run the following command: 当我尝试运行以下命令时,我无法在Windows上安装mod_wsgi:

pip install mod_wsgi

It says- 它说-

Collecting mod-wsgi
Using cached mod_wsgi-4.4.14.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 20, in <module>
  File "c:\users\aditya\appdata\local\temp\pip-build-ffaywu\mod-wsgi\setup.p
     y", line 139, in <module>
    'missing Apache httpd server packages.' % APXS)
  RuntimeError: The 'apxs' command appears not to be installed or is not 
  executable. Please check the list of prerequisites in the documentation 
  for this package and install any missing Apache httpd server packages.

It is missing the apxs , which is not present in my default apache installation. 它缺少apxs ,这在我的默认apache安装中不存在。 How do I get this apxs ?? 我怎么得到这个apxs? Is there any other way to install apache and then mod_wsgi into python installation? 有没有其他方法来安装apache然后mod_wsgi到python安装?

EDIT - I even tried pip install mod_wsgi-httpd, but it does not work as it says- 编辑 - 我甚至尝试了pip install mod_wsgi-httpd,但它不能正常工作,因为它说 -

Failed to build APR.

It is because you cannot use the pip installable mod_wsgi on Windows. 这是因为您无法在Windows上使用pip可安装的mod_wsgi。 You need to use precompiled binaries as described at: 您需要使用预编译的二进制文件,如下所述:

https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst

Courtesy: Graham Dumpleton ( https://github.com/GrahamDumpleton/mod_wsgi/issues/76 ) 礼貌:Graham Dumpleton( https://github.com/GrahamDumpleton/mod_wsgi/issues/76

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM