I was trying to implement this script to be able to wrap ETH into wETH.

So, I installed Brownie by running pip3 install eth-brownie.

However, I am having trouble importing interface in the first line of the script: from brownie import accounts, config, network, interface.

When it's run, I get the following error message:

from brownie import accounts, config, network, interface
ImportError: cannot import name 'interface' from 'brownie' (/home/blackwidow/.local/lib/python3.8/site-packages/brownie/__init__.py)

It appears I am not the only person with this issue as this has been reported in the past with no apparent solution.

  • Do you have an interface folder? Oct 20, 2021 at 0:35
  • Could you download brownie with pipx instead of pip? Oct 20, 2021 at 0:35
  • 1
    @PatrickCollins Am I supposed to find interface folder in .brownie folder? If so, no, I only have accounts ethpm and packages. I do have interfaces folder along with build contracts reports scripts and tests folders when i run brownie init Also, I have tried both pipx install eth-brownie and pip install eth-brownie. One thing i noticed is, if I use pip, it does compile the python script with from brownie import accounts but it does not if I had used pipx. They both regardless recognize brownie if I enter brownie in the terminal. Thank you.
    – Blackwidow
    Oct 20, 2021 at 5:29

1 Answer 1


dude check the run command it should be

brownie run scripts/get_weth.py --network kovan

and NOT

python scripts/get_weth.py --network kovan

I made the same mistake :P

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.