0

我正在尝试在 Windows 10 上为 python3.7.5 安装 web3。但我每次都会收到此错误。我不知道该怎么办,因为我已经安装了“Microsoft Visual C++ 14.0”和Build Tools。我也尝试在虚拟环境中安装,但以同样的错误结束。谢谢你的建议。

  Building wheel for lru-dict (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Žaneta\\AppData\\Local\\Temp\\pip-install-p2lk_xob\\lru-dict\\setup.py'"'"'; __file__='"'"'C:\\Users\\Žaneta\\AppData\\Local\\Temp\\pip-install-p2lk_xob\\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\Žaneta\AppData\Local\Temp\pip-wheel-89ed3hox'
       cwd: C:\Users\Žaneta\AppData\Local\Temp\pip-install-p2lk_xob\lru-dict\
  Complete output (5 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'lru' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
4

3 回答 3

0

我知道这很旧,但是对于遇到此问题的任何人,我都通过遵循github上发布的解决方案解决了它

这是解决方案:

  1. 在此处安装 Visual Studio 构建工具
  2. 选择“Desktop development with C++”Workload进行安装(大约6GB)
  3. 完成安装并重启电脑
  4. 打开终端重试 pip install web3

所需工作量的屏幕截图

于 2022-02-12T22:00:47.797 回答
0

问题解决了。Cytoolz 支持 Python 2.7+ 和 Python 3.4+。我有 Python 3.8.5,所以现在我在 Python 3.2 上运行并安装了 Web3

于 2020-11-03T09:13:42.957 回答
-1

鉴于错误消息:

error: Microsoft Visual C++ 14.0 or greater is required. 

您可能只需要 Microsoft Visual C++ 14.0 或更高版本。

于 2021-11-27T03:04:36.500 回答