Python pip安装web3未安装

Python pip安装web3未安装,python,pip,web3,Python,Pip,Web3,如有任何建议,将不胜感激。我已经安装了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“失败,

如有任何建议,将不胜感激。我已经安装了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“失败,退出状态为2
,如前所述,我已安装Visual Studio,因此我不明白我是否已将其视为一个需要创建的环境变量。从外观上看,它似乎是一个丢失的文件夹错误,如果是,我该如何着手解决此问题

多谢各位

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—编译检查日志以获得完整的命令输出。

这里的问题是

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
源代码,并尝试使用visual studio在
C:\Program Files(x86)\Microsoft visual studio中附带的编译器对其进行编译


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

看起来你在使用python3.7,你能尝试一下
pip3安装…
而不是
pip安装…
hummm谢谢你刚才给我的建议“pip3安装web3”但不幸的是,它导致了同样的错误。如果我使用pip3,这是否意味着我需要将python版本降级到3?我只是看了一下,它说它支持Python3.6+,没有pip3适用于任何Python3+,无论是3.5还是3.7。另外,你已经安装了python3.7,所以应该不会有问题。谢谢你,我刚刚在python3.6上提供了它,以防3.7不适用于web3。您是否对我如何修复此错误有任何想法?谢谢您的帮助,我刚刚修改了visual studio并安装了“visual studio SDK”和Windows 10 SDK(10.0.16299.0),但是重新启动后,我仍然收到相同的错误。他们的VS是否还有其他东西我也应该尝试安装?感谢我,
io.h
位于
C:\Program Files(x86)\Windows Kits\10\Include\10.0.16299.0\ucrt
安装
10.0.16299.0 SDK
后,您能检查一下该文件夹是否也存在吗?哦,是多么有趣啊!下面是io.h#pragma once#define#INC#io#include managed中的代码,通过安装just-able everything in VS Thank使其工作!