udatetime(setup.py)的建筑轮子错误/建筑轮子失败-WINDOWS

时间:2020-08-21 15:09:16

标签: python pip windows-10

我是使用Python /命令行的初学者。但是,我已经能够通过Windows Powershell成功安装/使用Python并使用pip安装软件包。最近,我一直在尝试安装“ udatetime”,但我不知道为什么它会继续出错并无法安装。

以下是有关我的设置和此问题的一些信息:

  • 操作系统:Windows 10
  • Python版本:3.8.2

以前尝试过的解决方案

  • 已安装Microsoft Visual Studio C ++
  • 已安装的车轮套件
  • 升级pip / setuptools

错误代码(通过命令行)

Collecting udatetime
  Using cached udatetime-0.0.16.tar.gz (13 kB)
Building wheels for collected packages: udatetime
  Building wheel for udatetime (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\Bpkennedy\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Bpkennedy\\AppData\\Local\\Temp\\pip-install-irfu9reg\\udatetime\\setup.py'"'"'; __file__='"'"'C:\\Users\\Bpkennedy\\AppData\\Local\\Temp\\pip-install-irfu9reg\\udatetime\\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\Bpkennedy\AppData\Local\Temp\pip-wheel-ifmu4a0c'
       cwd: C:\Users\Bpkennedy\AppData\Local\Temp\pip-install-irfu9reg\udatetime\
  Complete output (34 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.8
  creating build\lib.win-amd64-3.8\udatetime
  copying udatetime\_pure.py -> build\lib.win-amd64-3.8\udatetime
  copying udatetime\__init__.py -> build\lib.win-amd64-3.8\udatetime
  running egg_info
  writing udatetime.egg-info\PKG-INFO
  writing dependency_links to udatetime.egg-info\dependency_links.txt
  writing top-level names to udatetime.egg-info\top_level.txt
  reading manifest file 'udatetime.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'udatetime.egg-info\SOURCES.txt'
  running build_ext
  building 'udatetime.rfc3339' extension
  creating build\temp.win-amd64-3.8
  creating build\temp.win-amd64-3.8\Release
  creating build\temp.win-amd64-3.8\Release\src
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D_PYTHON3=1 -IC:\Users\Bpkennedy\AppData\Local\Programs\Python\Python38\include -IC:\Users\Bpkennedy\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tc./src/rfc3339.c /Fobuild\temp.win-amd64-3.8\Release\./src/rfc3339.obj -Ofast -std=c99
  cl : Command line warning D9025 : overriding '/Os' with '/Ot'
  cl : Command line warning D9002 : ignoring unknown option '-Of'
  cl : Command line warning D9002 : ignoring unknown option '-Oa'
  cl : Command line warning D9002 : ignoring unknown option '-std=c99'
  rfc3339.c
  ./src/rfc3339.c(100): error C2079: 't' uses undefined struct 'timeb'
  ./src/rfc3339.c(101): warning C4013: 'ftime' undefined; assuming extern returning int
  ./src/rfc3339.c(102): error C2224: left of '.time' must have struct/union type
  ./src/rfc3339.c(102): error C2224: left of '.millitm' must have struct/union type
  ./src/rfc3339.c(102): warning C4033: '_gettime' must return a value
  ./src/rfc3339.c(275): warning C4244: 'function': conversion from 'size_t' to 'double', possible loss of data
  ./src/rfc3339.c(275): warning C4244: '=': conversion from 'double' to 'unsigned int', possible loss of data
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for udatetime
  Running setup.py clean for udatetime
Failed to build udatetime
DEPRECATION: Could not build wheels for udatetime which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: udatetime
    Running setup.py install for udatetime ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\Bpkennedy\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Bpkennedy\\AppData\\Local\\Temp\\pip-install-irfu9reg\\udatetime\\setup.py'"'"'; __file__='"'"'C:\\Users\\Bpkennedy\\AppData\\Local\\Temp\\pip-install-irfu9reg\\udatetime\\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\Bpkennedy\AppData\Local\Temp\pip-record-_iw6ed71\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Bpkennedy\AppData\Local\Programs\Python\Python38\Include\udatetime'
         cwd: C:\Users\Bpkennedy\AppData\Local\Temp\pip-install-irfu9reg\udatetime\
    Complete output (34 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\udatetime
    copying udatetime\_pure.py -> build\lib.win-amd64-3.8\udatetime
    copying udatetime\__init__.py -> build\lib.win-amd64-3.8\udatetime
    running egg_info
    writing udatetime.egg-info\PKG-INFO
    writing dependency_links to udatetime.egg-info\dependency_links.txt
    writing top-level names to udatetime.egg-info\top_level.txt
    reading manifest file 'udatetime.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'udatetime.egg-info\SOURCES.txt'
    running build_ext
    building 'udatetime.rfc3339' extension
    creating build\temp.win-amd64-3.8
    creating build\temp.win-amd64-3.8\Release
    creating build\temp.win-amd64-3.8\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D_PYTHON3=1 -IC:\Users\Bpkennedy\AppData\Local\Programs\Python\Python38\include -IC:\Users\Bpkennedy\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tc./src/rfc3339.c /Fobuild\temp.win-amd64-3.8\Release\./src/rfc3339.obj -Ofast -std=c99
    cl : Command line warning D9025 : overriding '/Os' with '/Ot'
    cl : Command line warning D9002 : ignoring unknown option '-Of'
    cl : Command line warning D9002 : ignoring unknown option '-Oa'
    cl : Command line warning D9002 : ignoring unknown option '-std=c99'
    rfc3339.c
    ./src/rfc3339.c(100): error C2079: 't' uses undefined struct 'timeb'
    ./src/rfc3339.c(101): warning C4013: 'ftime' undefined; assuming extern returning int
    ./src/rfc3339.c(102): error C2224: left of '.time' must have struct/union type
    ./src/rfc3339.c(102): error C2224: left of '.millitm' must have struct/union type
    ./src/rfc3339.c(102): warning C4033: '_gettime' must return a value
    ./src/rfc3339.c(275): warning C4244: 'function': conversion from 'size_t' to 'double', possible loss of data
    ./src/rfc3339.c(275): warning C4244: '=': conversion from 'double' to 'unsigned int', possible loss of data
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Bpkennedy\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Bpkennedy\\AppData\\Local\\Temp\\pip-install-irfu9reg\\udatetime\\setup.py'"'"'; __file__='"'"'C:\\Users\\Bpkennedy\\AppData\\Local\\Temp\\pip-install-irfu9reg\\udatetime\\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\Bpkennedy\AppData\Local\Temp\pip-record-_iw6ed71\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Bpkennedy\AppData\Local\Programs\Python\Python38\Include\udatetime' Check the logs for full command output.

谢谢任何可以帮助我的人。这让我有点发疯,并且我读过许多其他Stack Overflow帖子,试图解决都没有成功。

布莱恩

1 个答案:

答案 0 :(得分:1)

udatetime version 0.0.16,最新版本于2018年2月14日。支持Python 2.6 ,2.7和3.5(我真的怀疑它是否支持Python 3)。

似乎就像一个过时的废弃的仅限Python2的项目。我的建议:忘记它,继续前进。