python - Django 属性模块 OS
问题描述
我正在尝试在我的本地 Windows 机器上安装 Vataxia 社交网络平台,但我收到了类似的消息。
ERROR: Command errored out with exit status 1:
command: 'c:\users\rade\desktop\vataxia\back\env\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-mb9x0ep8\\uWSGI\\setup.py'"'"'; __file__='"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-mb9x0ep8\\uWSGI\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-mb9x0ep8\uWSGI\
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-mb9x0ep8\uWSGI\setup.py", line 3, in <module>
import uwsgiconfig as uc
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-mb9x0ep8\uWSGI\uwsgiconfig.py", line 8, in <module>
uwsgi_os = os.uname()[0]
AttributeError: module 'os' has no attribute 'uname'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
谁知道怎么修它?
解决方案
os.name
仅在 Linux 机器上可用。
如果不更改软件的代码,您正在查看的软件,或者至少一个如果它是依赖项,则无法在 Windows 上运行。
我做了一些谷歌搜索,发现您可能正在克隆一个 git 存储库来获取它。尝试替换platform.system()
.os.name
推荐阅读
- fortran - 使用 Fortran 从文件中提取指定行
- python - 使用 LMFIT 将对数正态模型拟合到数据
- javascript - Wordpress 的指针
- keras - 如何使用 keras 实现多标签分类神经网络
- javascript - 如何在 AWS 上向 EC2 发出 AJAX 请求,需要登录名/密码
- php - 图像上传仍在 CI 中通过回调验证提交
- split - 使用c#将文本文件拆分为双字
- javascript - 无法让 babel-loader 为 String.prototype.trimLeft()(又名 trimStart)添加 polyfill
- laravel - 使用 Laravel 订购商品的逻辑
- java - 获取 json 元素 URL 网络 bean