我一直试图通过pipx在VSCode (https://eth-brownie.readthedocs.io/en/stable/install.html)的Powershell终端上安装Brownie。在链接中,我尝试了前两个命令,然后系统给我确认pipx已经添加到PATH中:
python -m pip install --user pipx
python -m pipx ensurepath
...
C:\Users\Name\AppData\Roaming\Python\Python310\Scripts has been been added to PATH, but you need to open a new terminal or re-login for this PATH change to
take effect.
C:\Users\Name\.local\bin has been been added to PATH, but you need to open a new terminal or re-login for this PATH change to take effect.
You will need to open a new terminal or re-login for the PATH changes to take effect.
Otherwise pipx is ready to go! ✨ ✨在加载一个新的Powershell之后,我尝试了最后的命令,如链接中所示,但是却得到了下面的错误:
pipx install eth-brownie
...
pipx : The term 'pipx' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
+ pipx install eth-brownie
+ ~~~~
+ CategoryInfo : ObjectNotFound: (pipx:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException如果输出声称它在路径上是可访问的,那么为什么不能将pipx识别为命令呢?在任何情况下,我都尝试在开始时修改命令以包含python -m。我的理解是,这首先是我的python程序,然后访问与pipx有关的任何内容?在打印另一个错误之前,它运行了几秒钟:
python -m pipx install eth-brownie
...
Fatal error from pip prevented installation. Full pip output in file:
C:\Users\Name\.local\pipx\logs\cmd_2022-01-05_20.58.07_pip_errors.log
pip failed to build package:
cytoolz
Some possibly relevant errors from pip install:
build\lib.win-amd64-3.10\cytoolz\functoolz.cp310-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120
Error installing eth-brownie.我对这个错误感到不知所措。我的直觉告诉我,我从微软下载的构建工具有问题:https://visualstudio.microsoft.com/visual-cpp-build-tools/Code。但如果我能解决第一个问题,也许这是多余的。
发布于 2022-01-06 03:06:46
如果未安装"pipx“,请确保已从python3安装了”pipx“,请运行
python3 -m pip install --user pipx或检查env是否已安装路径--我之前也有相同的错误,我尝试使用python的另一个环境。
py -m pip install --user -U pipx测试pipx的最佳方法,签入目录: C:\Users....local
添加env 在这里输入图像描述
您需要打开一个新的终端或重新登录以使路径更改生效。
否则pipx准备好了
发布于 2022-01-07 02:22:33
我重新启动了我的机器,并且至少能够识别pipx,但是在使用"pipx install error“时,我得到了与我的帖子底部相同的致命错误。然后,我验证我安装了cython和cytoolz (尝试了每个pip安装,并接收到输出,说明需求已经满足),尽管错误声明"pip未能构建包: cytoolz“,但最后我发现了一些帖子,表明pipx只适用于Python3.9。最后,我尝试了一个pip安装而不是pipx,这是有效的。
如果有人知道任何潜在的陷阱,一个pip而不是pipx安装eth,我会很高兴听到,但至少它是在最后安装。
https://stackoverflow.com/questions/70601843
复制相似问题