[FIXED] ImportError: cannot import name 'Web3' from 'web3'

Saw Anvil had the web3 module for Ethereum. So following the web3 quickstart documentation, I am trying to import on server side and connect using:

(copied directly from docs: Quickstart — Web3.py 5.24.0 documentation)

from web3 import Web3

That’s all. Tried different combinations and on client side as well just in case, but in the console I am getting the error:

ImportError: cannot import name 'Web3' from 'web3' (/usr/local/lib/python3.7/site-packages/web3/__init__.py)

Works for me locally in a python virtual environment but I have to use ipython.

I’m on the individual plan, all Python 3. I know I can use uplink but I wanted to move away from working on this locally.

Any ideas on the issue?

Seems like you are doing things right. Could you confirm that you are using a Full Python runtime on the server side and not the limited one?


Yes, using using Full Python.

Even tried to switch from beta editor and when it errors it has more info. It asks if I need more packages and then links to the package list page.

1 Like

I’ve moved this to bug reports. We’re investigating why this doesn’t work, and I’ll update this thread when we’ve fixed it.


This should now be fixed!