window安装uwsgi 遇到AttributeError: 'module' object has no attribute 'uname' 完美解决
2018-01-30 20:33
866 查看
因为os.uname()方法在window不可用,导致错误。
解决方案很简单:
1.https://pypi.python.org/pypi/uWSGI/下载你想要的uwsgi 压缩文件
2.在你需要用它的python文件的site-packages文件中解压缩
3.找到uwsgiconfig.py配置文件
4.使用任何一款python IDE打开它,在开头输入 import platform,然后启动替换(一般快捷为Ctrl+H)
5.寻找
6.replaceall 注意搜索时不要加括号否则没反应(正则)
解决方案很简单:
1.https://pypi.python.org/pypi/uWSGI/下载你想要的uwsgi 压缩文件
2.在你需要用它的python文件的site-packages文件中解压缩
3.找到uwsgiconfig.py配置文件
4.使用任何一款python IDE打开它,在开头输入 import platform,然后启动替换(一般快捷为Ctrl+H)
5.寻找
os.uname替换为
platform.uname
6.replaceall 注意搜索时不要加括号否则没反应(正则)
相关文章推荐
- Scrapy安装报错:AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'解决办法
- ansible安装遇到"AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'"的问题
- AttributeError: 'module' object has no attribute 'Frame' 解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- import json后,报错:AttributeError: 'module' object has no attribute 'dumps,原因分析及解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- python错误:AttributeError: 'module' object has no attribute 'setdefaultencoding'问题的解决方法
- Python3.X识别混合编码,顺便解决“AttributeError: 'module' object has no attribute 'urlopen'”
- import json后,报错:AttributeError: 'module' object has no attribute 'dumps,原因分析及解决方法
- Tensorflow protobuf版本报错问题解决(AttributeError: 'module' object has no attribute 'Default')
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- 解决 AttributeError: 'module' object has no attribute 'convolution'
- Python2.7 安装mock出现AttributeError: 'module' object has no attribute的解决方法
- Django报错:AttributeError: 'module' object has no attribute 的解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- python遇到AttributeError: 'str' object has no attribute '_getAssertEqualityFunc'问题解决过程
- Mac 安装scrapy框架报错AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'解决办法
- python错误:AttributeError: 'module' object has no attribute 'setdefaultencoding'问题的解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法