4

I am preparing for the chainlink bootcamp and my brownie installation seems to be ok but when I try brownie initI get an error, even when I run as administrator and if I specify the file. See link below for screenshot.

C:\WINDOWS\system32>brownie init C:\Users\Chris\Documents\Brownie
INFO: Could not find files for the given pattern(s).
Brownie v1.14.6 - Python development framework for Ethereum

  File "c:\users\chris\appdata\local\programs\python\python39\lib\site-packages\brownie\_cli\__main__.py", line 64, in main
    importlib.import_module(f"brownie._cli.{cmd}").main()
  File "c:\users\chris\appdata\local\programs\python\python39\lib\site-packages\brownie\_cli\init.py", line 31, in main
    path = project.new(args["<path>"] or ".", args["--force"], args["--force"])
  File "c:\users\chris\appdata\local\programs\python\python39\lib\site-packages\brownie\project\main.py", line 583, in new
    _create_folders(project_path)
  File "c:\users\chris\appdata\local\programs\python\python39\lib\site-packages\brownie\project\main.py", line 920, in _create_folders
    project_path.joinpath(path).mkdir(exist_ok=True)
  File "c:\users\chris\appdata\local\programs\python\python39\lib\pathlib.py", line 1313, in mkdir
    self._accessor.mkdir(self, mode)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\Chris\\Documents\\Brownie\\build'

Brownie error screenshot

3 Answers3

3

This maybe silly, but I had the same problem and I solved like this: I just move to the folder where I wanted to init my project and just run: brownie init my-projects-name and it worked perfectly. It is important that my-projects-name folder WAS NOT CREATED before running. So maybe you can run:

cd C:\Users\Chris\Documents\Brownie
brownie init my-first-brownie-project
1

As per this https://eth-brownie.readthedocs.io/en/stable/install.html

Brownie is depends on some dependencies

  1. python3 version 3.6 or greater, python3-dev

  2. ganache-cli - tested with version 6.12.2

please check this go through this documentation

Dharman
  • 30,962
  • 25
  • 85
  • 135
Harsh Kairamkonda
  • 387
  • 1
  • 6
  • 18
-1

Going by the stack trace you posted, it looks like you're trying to initialise brownie a folder in a folder that does not yet exist. The FileNotFoundError is thrown when there are parent-folders that don't exist yet in the path (see Python docs for mkdir here), which is likely what's happening here.

I can reproduce this error by doing brownie init ~/test-folder-that-doesn't-exist/brownie, where brownie and test-folder-doesn't-exist both are directories that are yet to be made. but doing brownie init ~/brownie does work (even if brownie has not been made yet)

Hope this helps!

C. Boon
  • 11
  • 3