【问题标题】:Running python file with brownie用布朗尼运行 python 文件
【发布时间】:2022-01-03 19:20:58
【问题描述】:

我不知道如何处理这个问题,可能是安装错误的东西,idk,正在寻找你的帮助

brownie run scripts/deploy.py
INFO: Could not find files for the given pattern(s).
Brownie v1.17.1 - Python development framework for Ethereum

BrownieSimpleStorageProject is the active project.

Launching 'ganache-cli.cmd --port 8545 --gasLimit 12000000 --accounts 10 --hardfork istanbul --mnemonic brownie'...
  File "c:\users\tomek\appdata\local\programs\python\python38\lib\site-packages\brownie\_cli\__main__.py", line 64, in main
    importlib.import_module(f"brownie._cli.{cmd}").main()
  File "c:\users\tomek\appdata\local\programs\python\python38\lib\site-packages\brownie\_cli\run.py", line 44, in main
    network.connect(CONFIG.argv["network"])
  File "c:\users\tomek\appdata\local\programs\python\python38\lib\site-packages\brownie\network\main.py", line 50, in connect
    rpc.launch(active["cmd"], **active["cmd_settings"])
  File "c:\users\tomek\appdata\local\programs\python\python38\lib\site-packages\brownie\network\rpc\__init__.py", line 75, in launch
    self.process = self.backend.launch(cmd, **kwargs)
  File "c:\users\tomek\appdata\local\programs\python\python38\lib\site-packages\brownie\network\rpc\ganache.py", line 73, in launch
    return psutil.Popen(cmd_list, stdin=DEVNULL, stdout=out, stderr=out)
  File "c:\users\tomek\appdata\local\programs\python\python38\lib\site-packages\psutil\__init__.py", line 1312, in __init__
    self.__subproc = subprocess.Popen(*args, **kwargs)
  File "c:\users\tomek\appdata\local\programs\python\python38\lib\subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "c:\users\tomek\appdata\local\programs\python\python38\lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Nie można odnaleźć określonego pliku

【问题讨论】:

标签: python brownie


【解决方案1】:

你需要安装 ganache-cli 包,因为 brownie 依赖它,所以在你的终端(安装 nodejs LTS 之后)输入“npm install -g ganache-cli”,然后再试一次,它应该可以工作。

【讨论】:

    猜你喜欢
    • 2021-12-23
    • 2021-12-03
    • 2023-02-06
    • 1970-01-01
    • 2022-08-09
    • 2021-09-21
    • 2021-02-01
    • 2021-11-06
    • 2022-07-05
    相关资源
    最近更新 更多