我尝试用python3.9安装mod_wsgi
,遇到了以下问题:
Collecting mod_wsgi
Using cached mod_wsgi-4.9.0.tar.gz (497 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Abderrahim\AppData\Local\Temp\pip-install-vyvmq_yd\mod-wsgi_44a42999c6a1497587de7d892a9a5a00\setup.py", line 81, in <module>
raise RuntimeError('No Apache installation can be found. Set the '
RuntimeError: No Apache installation can be found. Set the MOD_WSGI_APACHE_ROOTDIR environment to its location.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
我知道我已经安装了visual studio构建工具,我需要帮助,请
2条答案
按热度按时间gtlvzcf81#
请参阅此处的安装说明:
https://pypi.org/project/mod-wsgi/
如果您使用的是Windows,并且Apache发行版未安装到目录C:/Apache 24中,请首先将环境变量MOD_WSGI_APACHE_ROOTDIR设置为包含Apache发行版的目录
b4qexyjb2#
如果你在Apache2上使用mod_wsgi,使用Python 3.6而不是Python 3.9可能会更好。默认mod_wsgi是python3.6的