I'm getting this error when I try to setup a brownie project using brownie init. I initially installed brownie using pip install eth-brownie in the virtual environment. The folder .venv is present because of that. Not sure if I'm getting error because of .venv folder. Any suggestions how to work around this problem? Thank you in advance!!

Brownie v1.17.0 - Python development framework for Ethereum

  File "brownie/_cli/__main__.py", line 64, in main
  File "brownie/_cli/init.py", line 31, in main
    path = project.new(args["<path>"] or ".", args["--force"], args["--force"])
  File "brownie/project/main.py", line 584, in new
    raise FileExistsError(f"Directory is not empty: {project_path}")
FileExistsError: Directory is not empty: /Users/patrick/demos/contracts

enter image description here

  • It seems to work when I'm not using virtual environment but when I check brownie documentation they mention it is recommended to setup venv and then use pip to install eth-brownie. Commented Nov 15, 2021 at 11:05

3 Answers 3


This is because there is stuff in your directory already.

You can either:

Force create the directory

brownie init --force

Which will create the brownie sample directory alongside your existing code/contracts/.venv file.

Remove everything in that directory

rm -rf *
brownie init

Create a new folder with your brownie project

mkdir brownie_project
cd brownie_project
brownie init

there might be two things.

  1. .hypothesis
  2. you might have something inside the folder

So we need to remove those things

rm * ( Then press A to remove all)

then run

Brownie init

if .hypothesis file comes again then remove everything from the file then run the following command..

Brownie init --force

brownie init --force 

works, but I wonder what's the problem with this .hypothesis? what is this lib for?

  • Hi VladislavLenskii! Welcome to Ethereum Stackexchange! To answer and old question you have to provide more content than existing answers.
    – Ismael
    Commented Feb 26, 2023 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.