0

我试图安装一个项目的一些要求,我想在 conda 虚拟环境(Windows 10、Python 3.6)中本地重现其结果。但是,我在安装 bcolz 时不断收到这些错误,第一次构建轮子失败并且运行 setup.py clean 失败。第一个错误中的某些行在命令窗口中不可见。

      ----------------------------------------
  ERROR: Failed building wheel for bcolz
  Running setup.py clean for bcolz
Failed to build bcolz
Installing collected packages: bcolz
    Running setup.py install for bcolz ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\SURAJJ~1\\AppData\\Local\\Temp\\pip-install-h9n_6hlg\\bcolz_7f9dff8e098e4c12bdfb5359f23d0175\\setup.py'"'"'; __file__='"'"'C:\\Users\\SURAJJ~1\\AppData\\Local\\Temp\\pip-install-h9n_6hlg\\bcolz_7f9dff8e098e4c12bdfb5359f23d0175\\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\SURAJJ~1\AppData\Local\Temp\pip-record-y0154arb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Anaconda\Include\bcolz'
         cwd: C:\Users\SURAJJ~1\AppData\Local\Temp\pip-install-h9n_6hlg\bcolz_7f9dff8e098e4c12bdfb5359f23d0175\
    Complete output (64 lines):
    SSE2 detected
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\bcolz
    copying bcolz\arrayprint.py -> build\lib.win-amd64-3.7\bcolz
    copying bcolz\attrs.py -> build\lib.win-amd64-3.7\bcolz
    copying bcolz\chunked_eval.py -> build\lib.win-amd64-3.7\bcolz
    copying bcolz\ctable.py -> build\lib.win-amd64-3.7\bcolz
    copying bcolz\defaults.py -> build\lib.win-amd64-3.7\bcolz
    copying bcolz\py2help.py -> build\lib.win-amd64-3.7\bcolz
    copying bcolz\py2help_tests.py -> build\lib.win-amd64-3.7\bcolz
    copying bcolz\toplevel.py -> build\lib.win-amd64-3.7\bcolz
    copying bcolz\utils.py -> build\lib.win-amd64-3.7\bcolz
    copying bcolz\version.py -> build\lib.win-amd64-3.7\bcolz
    copying bcolz\__init__.py -> build\lib.win-amd64-3.7\bcolz
    creating build\lib.win-amd64-3.7\bcolz\tests
    copying bcolz\tests\all.py -> build\lib.win-amd64-3.7\bcolz\tests
    copying bcolz\tests\common.py -> build\lib.win-amd64-3.7\bcolz\tests
    copying bcolz\tests\test_attrs.py -> build\lib.win-amd64-3.7\bcolz\tests
    copying bcolz\tests\test_carray.py -> build\lib.win-amd64-3.7\bcolz\tests
    copying bcolz\tests\test_carray_objects.py -> build\lib.win-amd64-3.7\bcolz\tests
    copying bcolz\tests\test_ctable.py -> build\lib.win-amd64-3.7\bcolz\tests
    copying bcolz\tests\test_ndcarray.py -> build\lib.win-amd64-3.7\bcolz\tests
    copying bcolz\tests\test_queries.py -> build\lib.win-amd64-3.7\bcolz\tests
    copying bcolz\tests\__init__.py -> build\lib.win-amd64-3.7\bcolz\tests
    copying bcolz\carray_ext.pxd -> build\lib.win-amd64-3.7\bcolz
    running build_ext
    skipping 'bcolz\carray_ext.c' Cython extension (up-to-date)
    building 'bcolz.carray_ext' extension
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\bcolz
    creating build\temp.win-amd64-3.7\Release\c-blosc
    creating build\temp.win-amd64-3.7\Release\c-blosc\blosc
    creating build\temp.win-amd64-3.7\Release\c-blosc\internal-complibs
    creating build\temp.win-amd64-3.7\Release\c-blosc\internal-complibs\lz4-1.8.1.2
    creating build\temp.win-amd64-3.7\Release\c-blosc\internal-complibs\snappy-1.1.1
    creating build\temp.win-amd64-3.7\Release\c-blosc\internal-complibs\zlib-1.2.8
    creating build\temp.win-amd64-3.7\Release\c-blosc\internal-complibs\zstd-1.3.4
    creating build\temp.win-amd64-3.7\Release\c-blosc\internal-complibs\zstd-1.3.4\common
    creating build\temp.win-amd64-3.7\Release\c-blosc\internal-complibs\zstd-1.3.4\compress
    creating build\temp.win-amd64-3.7\Release\c-blosc\internal-complibs\zstd-1.3.4\decompress
    creating build\temp.win-amd64-3.7\Release\c-blosc\internal-complibs\zstd-1.3.4\deprecated
    creating build\temp.win-amd64-3.7\Release\c-blosc\internal-complibs\zstd-1.3.4\dictBuilder
    creating build\temp.win-amd64-3.7\Release\c-blosc\internal-complibs\zstd-1.3.4\legacy
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -DHAVE_ZSTD=1 -D__SSE2__=1 -Ibcolz -Ic-blosc\blosc -Ic-blosc/internal-complibs\lz4-1.8.1.2 -Ic-blosc/internal-complibs\snappy-1.1.1 -Ic-blosc/internal-complibs\zlib-1.2.8 -Ic-blosc/internal-complibs\zstd-1.3.4 -Ic-blosc/internal-complibs\zstd-1.3.4\common -Ic-blosc/internal-complibs\zstd-1.3.4\compress -Ic-blosc/internal-complibs\zstd-1.3.4\decompress -Ic-blosc/internal-complibs\zstd-1.3.4\deprecated -Ic-blosc/internal-complibs\zstd-1.3.4\dictBuilder -Ic-blosc/internal-complibs\zstd-1.3.4\dll -Ic-blosc/internal-complibs\zstd-1.3.4\legacy -IC:\Anaconda\lib\site-packages\numpy\core\include -IC:\Anaconda\include -IC:\Anaconda\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcbcolz\carray_ext.c /Fobuild\temp.win-amd64-3.7\Release\bcolz\carray_ext.obj -DSHUFFLE_SSE2_ENABLED
    carray_ext.c
    C:\Anaconda\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    SSE2 detected
    running install
    running build
    running build_py
    copying bcolz\version.py -> build\lib.win-amd64-3.7\bcolz
    running build_ext
    skipping 'bcolz\carray_ext.c' Cython extension (up-to-date)
    building 'bcolz.carray_ext' extension
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -DHAVE_ZSTD=1 -D__SSE2__=1 -Ibcolz -Ic-blosc\blosc -Ic-blosc/internal-complibs\lz4-1.8.1.2 -Ic-blosc/internal-complibs\snappy-1.1.1 -Ic-blosc/internal-complibs\zlib-1.2.8 -Ic-blosc/internal-complibs\zstd-1.3.4 -Ic-blosc/internal-complibs\zstd-1.3.4\common -Ic-blosc/internal-complibs\zstd-1.3.4\compress -Ic-blosc/internal-complibs\zstd-1.3.4\decompress -Ic-blosc/internal-complibs\zstd-1.3.4\deprecated -Ic-blosc/internal-complibs\zstd-1.3.4\dictBuilder -Ic-blosc/internal-complibs\zstd-1.3.4\dll -Ic-blosc/internal-complibs\zstd-1.3.4\legacy -IC:\Anaconda\lib\site-packages\numpy\core\include -IC:\Anaconda\include -IC:\Anaconda\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcbcolz\carray_ext.c /Fobuild\temp.win-amd64-3.7\Release\bcolz\carray_ext.obj -DSHUFFLE_SSE2_ENABLED
    carray_ext.c
    C:\Anaconda\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\SURAJJ~1\\AppData\\Local\\Temp\\pip-install-h9n_6hlg\\bcolz_7f9dff8e098e4c12bdfb5359f23d0175\\setup.py'"'"'; __file__='"'"'C:\\Users\\SURAJJ~1\\AppData\\Local\\Temp\\pip-install-h9n_6hlg\\bcolz_7f9dff8e098e4c12bdfb5359f23d0175\\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\SURAJJ~1\AppData\Local\Temp\pip-record-y0154arb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Anaconda\Include\bcolz' Check the logs for full command output.

我尝试解决这个问题:我搜索了 failed to build wheel for bcolz 并且我发现了 zipline installation error : failed building wheel for bcolz这从发布的日志中似乎有所不同。从丢失的文件“io.h”和帖子无法打开包含文件:'io.h':没有这样的文件或目录我认为这可能是构建工具问题,因此我从 Visual Studio 安装程序卸载并重新安装了构建工具,还尝试了 pip install buildtools,但没有任何改变(我确实安装了 Windows 10 SDK)。我的下一次尝试是在阅读了需要使用包含 io.h 的路径更新 INCLUDE 路径的答案之后,尽管这也没有改变任何东西。我对如何解决此错误没有更多想法,将不胜感激。

4

0 回答 0