如何在安装web3.py时消除错误

2024-10-03 21:24:30 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试在我的windows计算机上安装web3。我正在使用VisualStudio代码终端来实现这一点。我使用了这两个命令

  1. pip安装web3
  2. pip3安装web3

我遇到的第一个错误是关于我能够安装的Visual Studio构建工具。现在,当我运行命令时,我得到了这个错误

ERROR: Command errored out with exit status 1: 'C:\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ealvarado\\AppData\\Local\\Temp\\pip-install-nfyoy3t_\\cytoolz_9d52991e4515405886466c30cd8781ec\\setup.py'"'"'; __file__='"'"'C:\\Users\\ealvarado\\AppData\\Local\\Temp\\pip-install-nfyoy3t_\\cytoolz_9d52991e4515405886466c30cd8781ec\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ealvarado\AppData\Local\Temp\pip-record-g88od3fy\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Python310\Include\cytoolz' Check the logs for full command output.
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: You are using pip version 21.2.3; however, version 21.3 is available.
You should consider upgrading via the 'C:\Python310\python.exe -m pip install --upgrade pip' command. 

Tags: installpipversionlocalsetuprecordusersappdata
1条回答
网友
1楼 · 发布于 2024-10-03 21:24:30

WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)是因为在某个时间点,pip未能删除它在更新或安装时创建的临时文件夹或其他东西,要获得它的rip,只需转到列出的文件夹并删除名称以~开头的文件夹

另一个警告是升级pip,您应该这样做

至于这个错误,我不知道,也许这个库还不支持Python3.10,这就是为什么它会失败和/或您的过时pip由于过时而无法获取最新版本的原因

相关问题 更多 >