首页 > 解决方案 > 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.

谁知道怎么修它?

标签: pythondjangodjango-rest-framework

解决方案


os.name在 Linux 机器上可用。

如果不更改软件的代码,您正在查看的软件,或者至少一个如果它是依赖项,则无法在 Windows 上运行。

我做了一些谷歌搜索,发现您可能正在克隆一个 git 存储库来获取它。尝试替换platform.system().os.name


推荐阅读