[英]how to get uwsgi on windows
我使用了命令pip install uWSGI
但是我得到了错误
Using cached uwsgi-2.0.17.1.tar.gz (800 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Oscar\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Oscar\\AppData\\Local\\Temp\\pip-install-39mpiaq2\\uwsgi_c49548e783724e34b0711a03b318a590\\setup.py'"'"'; __file__='"'"'C:\\Users\\Oscar\\AppData\\Local\\Temp\\pip-install-39mpiaq2\\uwsgi_c49548e783724e34b0711a03b318a590\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Oscar\AppData\Local\Temp\pip-pip-egg-info-3lzq9ewp'
cwd: C:\Users\Oscar\AppData\Local\Temp\pip-install-39mpiaq2\uwsgi_c49548e783724e34b0711a03b318a590\
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Oscar\AppData\Local\Temp\pip-install-39mpiaq2\uwsgi_c49548e783724e34b0711a03b318a590\setup.py", line 3, in <module>
import uwsgiconfig as uc
File "C:\Users\Oscar\AppData\Local\Temp\pip-install-39mpiaq2\uwsgi_c49548e783724e34b0711a03b318a590\uwsgiconfig.py", line 8, in <module>
uwsgi_os = os.uname()[0]
AttributeError: module 'os' has no attribute 'uname'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/a2/c9/a2d5737f63cd9df4317a4acc15d1ddf4952e28398601d8d7d706c16381e0/uwsgi-2.0.17.1.tar.gz#sha256=d2318235c74665a60021a4fc7770e9c2756f9fc07de7b8c22805efe85b5ab277 (from https://pypi.org/simple/uwsgi/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached uwsgi-2.0.17.tar.gz (798 kB)
有谁知道如何解决这个错误?
通过切换操作系统。
uWSGI 不适用于裸 Windows。 (它可能适用于 Cygwin,但这可能不是您想要追求的。)
gunicorn 也不支持 Windows。 见https://github.com/benoitc/gunicorn/issues/524
如果你使用 Apche 服务器,你可以使用 mod_wsgi。 请参阅如何在 Windows 上将 mod_wsgi 安装到 Apache 中?
或者,使用 docker 可以成为一种解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.