4

I've installed eth brownie with the command pip install eth-brownie but when ever I type brownie, it says

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

Mitchell
  • 47
  • 1
  • 4

6 Answers6

2

I had this problem also, when running "pip install eth-brownie" in the command line, I was given a warning that said

C:\Users\my_username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts

is not on the PATH.

You could try running pip uninstall eth-brownie and re-installing pip install eth-brownie to see which file you need to add to PATH.

Copy the file path it gives (should look similar to what I posted above)

To add this to path (on windows 10) type advanced system settings into the search bar, click view advanced systems settings, a window that says "system properties" should pop up, click environment variables..., in the next window that pops up (titled environment variables) click on path then click edit, a new window will pop up titled edit environment variable click new then paste the file path into a new line. Click ok and close all of your programs (if you don't close/restart your programs they will not be aware of the change).

When you open your IDE (visual studio code in my case) you should be able to run brownie by typing brownie

Tugay
  • 2,057
  • 5
  • 17
  • 32
1

This at least causes a temp recognition of "Brownie":

$env:Path += ";C:\Users\<< username >>\.local\pipx\venvs\eth-brownie\Scripts"

This path will display too if you try to reinstall Brownie. Then add it to PATH variables.

Mikhail Zakharov
  • 904
  • 11
  • 22
werkhardor
  • 53
  • 5
1

I got zsh not recognize brownie command error, so i add the brownie executable into my PATH in .zshrc worked:

export PATH="/Users/{your_user_name}/.local/pipx/venvs/eth-brownie/bin:$PATH"

Not sure if this works for you.

Argos
  • 11
  • 1
0

The following steps worked for me on Mac OS.

step1: uninstall eth-brownie "pip uninstall eth-brownie"

step2: re-install "pip install eth-brownie"

step3: Quit VS Code and Open the project again.

0

using 'pip install eth-brownie' instead of 'pipx install eth-brownie' solved the problem for me.

0

I faced the same problem 6 months ago. The issue was with the Python paths in System Environment Variables. I had installed a 3.10 version of python however, pip and pipx was still installing packages in the path of 3.09. You can verify if you are facing the same problem:

  1. Hit Windows button and search for "Advanced System Settings"
  2. Hit Environment Variables to see the Path field
  3. If you see multiple paths of python versions, then that is a possible problem

What you need to do then is

  1. uninstall eth-brownie "pip uninstall eth-brownie"
  2. come back to the Path field in Advanced System Settings
  3. Remove any redundant paths by hitting the edit button
  4. Run pipx install eth-brownie (using pipx is recommended over pip)

step2: re-install "pip install eth-brownie"

TS_101
  • 16
  • 1