The recommended way to install Brownie is via pipx. Pipx is a tool to help you install and run end-user applications written in Python. It’s roughly similar to macOS’s
npx, and Linux’s
pipx installs Brownie into a virtual environment and makes it available directly from the commandline. Once installed, you will never have to activate a virtual environment prior to using Brownie.
pipx does not ship with Python. If you have not used it before you will probably need to install it.
python3 -m pip install --user pipx python3 -m pipx ensurepath
You may need to restart your terminal after installing
To install Brownie using
pipx install eth-brownie
Once installation is complete, type
brownie to verify that it worked:
$ brownie Brownie - Python development framework for Ethereum Usage: brownie <command> [<args>...] [options <args>]
Other Installation Methods¶
You can also install Brownie via
pip, or clone the repository and use
setuptools. If you install via one of these methods, we highly recommend using
venv and installing into a virtual environment.
To install via
pip install eth-brownie
To clone the github repository and install via
git clone https://github.com/eth-brownie/brownie.git cd brownie python3 setup.py install
Brownie has the following dependencies:
- python3 version 3.6 or greater, python3-dev
- ganache-cli - tested with version 6.10.1
The Brownie GUI is built using the Tk GUI toolkit. Both Tk and tkinter are available on most Unix platforms, as well as on Windows systems.
Tk is not a strict dependency for Brownie. However, if it is not installed on your system you will receive an error when attempting to load the GUI.
You can use the following command to check that Tk has been correctly installed:
python -m tkinter
This should open a simple window and display the installed version number.
For installation instructions read Installing TK within the TK Documentation.