我已经用pip install eth-brownie命令安装了brownie,但每当我输入brownie时,它就会显示
The term 'brownie' 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
发布于 2021-10-09 11:41:50
我也遇到了这个问题,当我在命令行中运行"pip install eth-brownie“时,我得到了一个警告:
C:\Users\my_username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts不在路径上。
您可以尝试运行pip uninstall eth-brownie并重新安装pip install eth-brownie,以查看需要添加到PATH中的文件。
复制它提供的文件路径(应该类似于我上面发布的内容)
要将此文件添加到path (在windows 10上),请在搜索栏中键入高级系统设置,单击view advanced systems settings (查看高级系统设置属性),弹出一个显示"system properties“的窗口,单击environment variables...,在下一个弹出窗口(标题为environment variables)中单击 path ,然后单击edit,将弹出一个新窗口,标题为编辑环境变量单击新建,然后将文件路径粘贴到新行中。单击ok并关闭所有程序(如果您不关闭/重新启动程序,它们将不会察觉到更改)。
当您打开您的集成开发环境(在我的示例中是visual studio代码)时,您应该能够通过输入brownie来运行brownie
发布于 2021-11-18 16:07:31
以下步骤适用于我在Mac OS上的操作。
step1: uninstall eth-brownie“pip uninstall eth-brownie”
step2:重新安装"pip install eth-brownie“
step3:退出VS代码并再次打开项目。
发布于 2021-12-16 19:45:04
这至少会导致临时识别"Brownie":
$env:Path += ";C:\Users\<< username >>\.local\pipx\venvs\eth-brownie\Scripts"如果您尝试重新安装Brownie,此路径也会显示。然后将其添加到PATH变量。
https://stackoverflow.com/questions/69127238
复制相似问题