[英]Command Prompt: pip install mod_wsgi
I am on Windows 10 trying to install mod_wsgi on virtualenv.我在 Windows 10 上尝试在 virtualenv 上安装 mod_wsgi。 I have already downloaded flask, python, VS, ... everything.我已经下载了 flask, python, VS, ... 一切。 Any work around?有什么解决办法吗? Couldn't attach the whole error bc it's too long.无法附加整个错误,因为它太长了。
(venv) C:\Users\cim\Desktop\api>pip install mod_wsgi
Collecting mod_wsgi
Using cached mod_wsgi-4.7.1.tar.gz (498 kB)
Building wheels for collected packages: mod-wsgi
Building wheel for mod-wsgi (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\cim\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\cim\\AppData\\Local\\Temp\\3\\pip-install-i1jx4yl7\\mod-wsgi\\setup.py'"'"'; __file__='"'"'C:\\Users\\cim\\AppData\\Local\\Temp\\3\\pip-install-i1jx4yl7\\mod-wsgi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\cim\AppData\Local\Temp\3\pip-wheel-vuv34mr5'
cwd: C:\Users\cim\AppData\Local\Temp\3\pip-install-i1jx4yl7\mod-wsgi\
Complete output (211 lines):
c:\users\cim\appdata\local\programs\python\python38-32\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.8
creating build\lib.win32-3.8\mod_wsgi
copying src\__init__.py -> build\lib.win32-3.8\mod_wsgi
creating build\lib.win32-3.8\mod_wsgi\server
copying src\server\apxs_config.py -> build\lib.win32-3.8\mod_wsgi\server
copying src\server\environ.py -> build\lib.win32-3.8\mod_wsgi\server
copying src\server\__init__.py -> build\lib.win32-3.8\mod_wsgi\server
creating build\lib.win32-3.8\mod_wsgi\server\management
copying src\server\management\__init__.py -> build\lib.win32-3.8\mod_wsgi\server\management
creating build\lib.win32-3.8\mod_wsgi\server\management\commands
copying src\server\management\commands\runmodwsgi.py -> build\lib.win32-3.8\mod_wsgi\server\management\commands
copying src\server\management\commands\__init__.py -> build\lib.win32-3.8\mod_wsgi\server\management\commands
creating build\lib.win32-3.8\mod_wsgi\docs
copying docs\_build\html\__init__.py -> build\lib.win32-3.8\mod_wsgi\docs
creating build\lib.win32-3.8\mod_wsgi\images
copying images\__init__.py -> build\lib.win32-3.8\mod_wsgi\images
copying images\snake-whiskey.jpg -> build\lib.win32-3.8\mod_wsgi\images
running build_ext
building 'mod_wsgi.server.mod_wsgi' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\src
creating build\temp.win32-3.8\Release\src\server
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\Apache24/include -Ic:\users\cim\appdata\local\programs\python\python38-32\include -Ic:\users\cim\appdata\local\programs\python\python38-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win32-3.8\Release\src/server\mod_wsgi.obj
mod_wsgi.c
I've installed mod_wsgi
to my mac, I can explain to you my steps, maybe you can get a hint.我已经在我的mac上安装了mod_wsgi
,我可以向你解释我的步骤,也许你可以得到一个提示。
I've downloaded the latest package from the official site, instead of pip
.我已经从官方网站下载了最新的 package ,而不是pip
。
The reason is I also got error using pip
原因是我在使用pip
也遇到了错误
I extracted the file using tar xvfz mod_wsgi-4.6.tar.gaz
.我使用tar xvfz mod_wsgi-4.6.tar.gaz
提取了文件。 I don't know the windows equivalent我不知道 windows 等效
./configure -> make -> make install ./configure -> make -> make install
Final step: Add LoadModule wsgi_module modules/mod_wsgi.so
to the /usr/local/etc/httpd/httpd.conf最后一步:将LoadModule wsgi_module modules/mod_wsgi.so
添加到 /usr/local/etc/httpd/httpd.conf
I restarted my apache server apachectl restart
.我重新启动了我的 apache 服务器apachectl restart
。
Before I run, I made sure the mod_wsgi
path was correct.在我运行之前,我确保mod_wsgi
路径是正确的。 For my mac
: /usr/local/lib/httpd/modules/mod_wsgi.so对于我的mac
:/usr/local/lib/httpd/modules/mod_wsgi.so
Figured out the problem.想通了问题。 Accidentally downloaded the 32bit python package instead of the 64bit.不小心下载了 32bit python package 而不是 64bit。 Since Apache and VS were all 64bit I encountered this error.由于 Apache 和 VS 都是 64bit 我遇到了这个错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.