首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >pip安装web3未安装

pip安装web3未安装
EN

Stack Overflow用户
提问于 2019-10-08 21:26:38
回答 4查看 6K关注 0票数 2

任何建议都将不胜感激。我已经安装了visual studio,就像它在错误中告诉我的那样,我也尝试过在venv环境中通过pip安装它,但是它仍然不能工作,我已经在下面包含了完整的错误消息。

这个错误消息有点长,这是它给error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2的最后一条消息,正如前面提到的,我已经安装了visual studio,所以我不明白我已经检查过它是一个环境变量,我需要创建一个无效的环境变量,从错误的外观来看,它听起来像是他们丢失的文件夹,如果是这样,我该如何解决这个问题?

谢谢你

代码语言:javascript
复制
ERROR: Command errored out with exit status 1:
       command: 'c:\users\carl-\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\carl-\\AppData\\Local\\Temp\\pip-install-pdkcfk2e\\lru-dict\\setup.py'"'"'; __file__='"'"'C:\\Users\\carl-\\AppData\\Local\\Temp\\pip-install-pdkcfk2e\\lru-dict\\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\carl-\AppData\Local\Temp\pip-wheel-gzs5afno' --python-tag cp37
           cwd: C:\Users\carl-\AppData\Local\Temp\pip-install-pdkcfk2e\lru-dict\
      Complete output (11 lines):
      running bdist_wheel
      running build
      running build_ext
      building 'lru' extension
      creating build
      creating build\temp.win-amd64-3.7
      creating build\temp.win-amd64-3.7\Release
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Ic:\users\carl-\appdata\local\programs\python\python37\include -Ic:\users\carl-\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include" /Tclru.c /Fobuild\temp.win-amd64-3.7\Release\lru.obj
      lru.c
      c:\users\carl-\appdata\local\programs\python\python37\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\\Community\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
      ----------------------------------------
      ERROR: Failed building wheel for lru-dict
      Running setup.py clean for lru-dict
      Building wheel for cytoolz (setup.py) ... error
      ERROR: Command errored out with exit status 1:
       command: 'c:\users\carl-\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\carl-\\AppData\\Local\\Temp\\pip-install-pdkcfk2e\\cytoolz\\setup.py'"'"'; __file__='"'"'C:\\Users\\carl-\\AppData\\Local\\Temp\\pip-install-pdkcfk2e\\cytoolz\\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\carl-\AppData\Local\Temp\pip-wheel-a6zbn7gs' --python-tag cp37
           cwd: C:\Users\carl-\AppData\Local\Temp\pip-install-pdkcfk2e\cytoolz\
      Complete output (55 lines):
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.7
      creating build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\compatibility.py -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\utils_test.py -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\_signatures.py -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\_version.py -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\__init__.py -> build\lib.win-amd64-3.7\cytoolz
      creating build\lib.win-amd64-3.7\cytoolz\curried
      copying cytoolz\curried\exceptions.py -> build\lib.win-amd64-3.7\cytoolz\curried
      copying cytoolz\curried\operator.py -> build\lib.win-amd64-3.7\cytoolz\curried
      copying cytoolz\curried\__init__.py -> build\lib.win-amd64-3.7\cytoolz\curried
      copying cytoolz\dicttoolz.pyx -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\functoolz.pyx -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\itertoolz.pyx -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\recipes.pyx -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\utils.pyx -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\cpython.pxd -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\dicttoolz.pxd -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\functoolz.pxd -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\itertoolz.pxd -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\recipes.pxd -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\utils.pxd -> build\lib.win-amd64-3.7\cytoolz
      copying cytoolz\__init__.pxd -> build\lib.win-amd64-3.7\cytoolz
      creating build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\dev_skip_test.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_compatibility.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_curried.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_curried_toolzlike.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_dev_skip_test.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_dicttoolz.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_docstrings.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_doctests.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_embedded_sigs.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_functoolz.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_inspect_args.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_itertoolz.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_none_safe.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_recipes.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_serialization.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_signatures.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_tlz.py -> build\lib.win-amd64-3.7\cytoolz\tests
      copying cytoolz\tests\test_utils.py -> build\lib.win-amd64-3.7\cytoolz\tests
      running build_ext
      building 'cytoolz.dicttoolz' extension
      creating build\temp.win-amd64-3.7
      creating build\temp.win-amd64-3.7\Release
      creating build\temp.win-amd64-3.7\Release\cytoolz
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Ic:\users\carl-\appdata\local\programs\python\python37\include -Ic:\users\carl-\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include" /Tccytoolz/dicttoolz.c /Fobuild\temp.win-amd64-3.7\Release\cytoolz/dicttoolz.obj
      dicttoolz.c
      c:\users\carl-\appdata\local\programs\python\python37\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\\Community\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
      ----------------------------------------
      ERROR: Failed building wheel for cytoolz
      Running setup.py clean for cytoolz
    Failed to build lru-dict cytoolz
    Installing collected packages: lru-dict, cytoolz, eth-utils, attrdict, hexbytes, parsimonious, eth-abi, eth-keys, eth-keyfile, rlp, eth-rlp, eth-account, web3
      Running setup.py install for lru-dict ... error
        ERROR: Command errored out with exit status 1:
         command: 'c:\users\carl-\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\carl-\\AppData\\Local\\Temp\\pip-install-pdkcfk2e\\lru-dict\\setup.py'"'"'; __file__='"'"'C:\\Users\\carl-\\AppData\\Local\\Temp\\pip-install-pdkcfk2e\\lru-dict\\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\carl-\AppData\Local\Temp\pip-record-89q4z0xh\install-record.txt' --single-version-externally-managed --compile
             cwd: C:\Users\carl-\AppData\Local\Temp\pip-install-pdkcfk2e\lru-dict\
        Complete output (11 lines):
        running install
        running build
        running build_ext
        building 'lru' extension
        creating build
        creating build\temp.win-amd64-3.7
        creating build\temp.win-amd64-3.7\Release
        C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Ic:\users\carl-\appdata\local\programs\python\python37\include -Ic:\users\carl-\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include" /Tclru.c /Fobuild\temp.win-amd64-3.7\Release\lru.obj
        lru.c
        c:\users\carl-\appdata\local\programs\python\python37\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\\Community\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
        ----------------------------------------
    ERROR: Command errored out with exit status 1: 'c:\users\carl-\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\carl-\\AppData\\Local\\Temp\\pip-install-pdkcfk2e\\lru-dict\\setup.py'"'"'; __file__='"'"'C:\\Users\\carl-\\AppData\\Local\\Temp\\pip-install-pdkcfk2e\\lru-dict\\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\carl-\AppData\Local\Temp\pip-record-89q4z0xh\install-record.txt' --single-version-externally-manag

ed --compile检查日志以获得完整的命令输出。

EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2019-10-08 21:53:21

这里的问题是

代码语言:javascript
复制
c:\users\carl-\appdata\local\programs\python\python37\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory

pip在这里所做的是下载web3源代码,并尝试使用C:\Program Files (x86)\Microsoft Visual Studio中visual studio附带的编译器对其进行编译

它失败了,因为它找不到与您可以使用Visual Studio Installer安装的Windows SDK (另请参阅this post)捆绑在一起的标头。只需选择“修改”,然后选择“单个组件”并安装“Windows10SDK”即可。这应该能解决你的问题

票数 1
EN

Stack Overflow用户

发布于 2021-11-04 07:01:13

只需安装cython即可

代码语言:javascript
复制
pip install cython #in the same environment
票数 3
EN

Stack Overflow用户

发布于 2021-11-04 23:19:00

不确定我的问题是否相同,但下载Microsoft C++构建工具对我有效。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58287344

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档