1. 直接在cmd中使用pip install uwsgi报错
直接在cmd中使用pip install uwsgi报错
AttributeError: module ‘os’ has no attribute ‘uname’
报错说明:
是因为uwsgiconfig.py文件中,os.uname()是不支持windows系统的,platform模块是支持任何系统
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersADMINI~1AppDataLocalTemppip-install-9kgm_b8suwsgisetup.py", line 3, in <module>
import uwsgiconfig as uc
File "C:UsersADMINI~1AppDataLocalTemppip-install-9kgm_b8suwsgiuwsgiconfig.py", line 8, in <module>
uwsgi_os = os.uname()[0]
AttributeError: module 'os' has no attribute 'uname'
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:UsersADMINI~1AppDataLocalTemppip-install-9kgm_b8suwsgi
2. 下载uwsgi离线包进行安雯
uwsgi离线包:https://pypi.org/project/uWSGI/#files
下载后解压,找到文件uwsgiconfig.py
3. 修改uwsgiconfig.py文件
使用什么工具修改自己喜欢 ,但注意是全部修改
4. 进入文件目录后再运行python sueup.py install
发现还是报错了,原因是没有C语言编译
Exception: you need a C compiler to build uWSGI
5. 下载安装MinGW
查看https://jingyan.baidu.com/article/0320e2c11564ca1b87507b8f.html
6 进入文件目录后再运行python sueup.py install
安装成功