无法安装Django-admin >> cl.exe错误失败,退出状态为1

时间:2020-05-10 11:38:51

标签: python django windows visual-studio

我正在尝试安装django-admin,但遇到以下错误:

C:\Users\Jonas\Desktop\CFD\CFD>pip install django-admin
Collecting django-admin
  Using cached django_admin-2.0.1-py2.py3-none-any.whl (7.6 kB)
Collecting django-excel-response2>=3.0.0
  Using cached django_excel_response2-3.0.2-py2.py3-none-any.whl (4.4 kB)
Collecting django-excel-base>=1.0.4
  Using cached django_excel_base-1.0.4-py2.py3-none-any.whl (4.0 kB)
Requirement already satisfied: django-six>=1.0.4 in c:\users\jonas\appdata\local\programs\python\python38-32\lib\site-packages (from django-excel-response2>=3.0.0->django-admin) (1.0.4)
Collecting screen
  Using cached screen-1.0.1.tar.gz (8.6 kB)
Requirement already satisfied: pytz in c:\users\jonas\appdata\local\programs\python\python38-32\lib\site-packages (from django-excel-base>=1.0.4->django-excel-response2>=3.0.0->django-admin) (2019.3)
Requirement already satisfied: xlwt in c:\users\jonas\appdata\local\programs\python\python38-32\lib\site-packages (from django-excel-base>=1.0.4->django-excel-response2>=3.0.0->django-admin) (1.3.0)
Building wheels for collected packages: screen
  Building wheel for screen (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\jonas\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jonas\\AppData\\Local\\Temp\\pip-install-qtl0gpmg\\screen\\setup.py'"'"'; __file__='"'"'C:\\Users\\Jonas\\AppDat
a\\Local\\Temp\\pip-install-qtl0gpmg\\screen\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Jonas\AppData\Local
\Temp\pip-wheel-kvutbeaf'
       cwd: C:\Users\Jonas\AppData\Local\Temp\pip-install-qtl0gpmg\screen\
  Complete output (17 lines):
  running bdist_wheel
  The [wheel] section is deprecated. Use [bdist_wheel] instead.
  running build
  running build_py
  creating build
  creating build\lib.win32-3.8
  creating build\lib.win32-3.8\screen
  copying screen\compat.py -> build\lib.win32-3.8\screen
  copying screen\old_str_util.py -> build\lib.win32-3.8\screen
  copying screen\__init__.py -> build\lib.win32-3.8\screen
  running build_ext
  building 'screen.str_util' extension
  creating build\temp.win32-3.8
  creating build\temp.win32-3.8\Release
  creating build\temp.win32-3.8\Release\source
  cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\jonas\appdata\local\programs\python\python38-32\include -Ic:\users\jonas\appdata\local\programs\python\python38-32\include /Tcsource/str_util.c /Fobuild\temp.win32-3.8\Release\source/str_util.obj
  error: command 'cl.exe' failed: No such file or directory
  ----------------------------------------
  ERROR: Failed building wheel for screen
  Running setup.py clean for screen
Failed to build screen
Installing collected packages: screen, django-excel-base, django-excel-response2, django-admin
    Running setup.py install for screen ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\jonas\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jonas\\AppData\\Local\\Temp\\pip-install-qtl0gpmg\\screen\\setup.py'"'"'; __file__='"'"'C:\\Users\\Jonas\\AppD
ata\\Local\\Temp\\pip-install-qtl0gpmg\\screen\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Jonas\AppData\L
ocal\Temp\pip-record-gvnaqfkb\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jonas\appdata\local\programs\python\python38-32\Include\screen'
         cwd: C:\Users\Jonas\AppData\Local\Temp\pip-install-qtl0gpmg\screen\
    Complete output (16 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.8
    creating build\lib.win32-3.8\screen
    copying screen\compat.py -> build\lib.win32-3.8\screen
    copying screen\old_str_util.py -> build\lib.win32-3.8\screen
    copying screen\__init__.py -> build\lib.win32-3.8\screen
    running build_ext
    building 'screen.str_util' extension
    creating build\temp.win32-3.8
    creating build\temp.win32-3.8\Release
    creating build\temp.win32-3.8\Release\source
    cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\jonas\appdata\local\programs\python\python38-32\include -Ic:\users\jonas\appdata\local\programs\python\python38-32\include /Tcsource/str_util.c /Fobuild\temp.win32-3.8\Release\source/str_util.obj
    error: command 'cl.exe' failed: No such file or directory
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\jonas\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jonas\\AppData\\Local\\Temp\\pip-install-qtl0gpmg\\screen\\setup.py'"'"'; __f
ile__='"'"'C:\\Users\\Jonas\\AppData\\Local\\Temp\\pip-install-qtl0gpmg\\screen\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install -
-record 'C:\Users\Jonas\AppData\Local\Temp\pip-record-gvnaqfkb\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jonas\appdata\local\programs\python\python38-32\Include\screen' Check the logs for full command output.

C:\Users\Jonas\Desktop\CFD\CFD>


我已经尝试了不同的解决方案,但是没有一个可行的方法:

  • 重新安装了Visual Basic Builder工具
  • 试图重新安装正确的车轮套件(GitHUB issue),但我无法安装任何车轮套件:
C:\Users\Jonas\Desktop\CFD\CFD>python -m pip install C:\Users\Jonas\Downloads\Twisted-20.3.0-cp37-cp37m-win_amd64.whl
ERROR: Twisted-20.3.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
  • similar SO issue, unsolved
  • 我尝试卸载并安装django-admin以外的其他软件包,它们可以工作
  • 删除并重新安装Django本身
  • 检查系统路径变量以查找缺少的链接

有什么解决办法吗?

0 个答案:

没有答案
相关问题