I have followed these instructions for installing monero-python. https://github.com/monero-ecosystem/monero-python#development when i try to call the wallet class in my programs from .monero_python_master.monero.wallet import Wallet, it can't find sha3. This is the error message i get.

Traceback (most recent call last):
  File "/home/#/Documents/#/Project/Monero Wallet/Code/Layer1/MainWindow.py", line 11, in <module>
    from monero_python_master.monero.wallet import Wallet
  File "/home/#/Documents/#/Project/Monero Wallet/Code/Layer1/monero_python_master/monero/__init__.py", line 1, in <module>
    from . import address, account, const, daemon, wallet, numbers, wordlists, seed
  File "/home/#/Documents/#/Project/Monero Wallet/Code/Layer1/monero_python_master/monero/address.py", line 3, in <module>
    from sha3 import keccak_256
ModuleNotFoundError: No module named 'sha3'

After running pip i have tried copying in the files that it download to where i thought the my program wanted it. this includes a sha3.py file but it still returns the same error.

When i run pytest i get an error that tells me via a "hint" in the output to delete the "pycache" in the "test" after doing that I run pytest again. This time it runs and shows green at the bottom but the percent it shows is 94%. I am wounder if this is because i am missing these files.

Any help would be greatly appreciated. I am not great at using pip so I am wondering if i am using it wrong (im geussing you not ment to copy the files in from monero_python_master/.venv/lib/python3.6/site-packages). Is the sha3 that pip download the one the error is about if so why cant it find it when I moved it in to its directory. I have been able to get the cli working from herehttps://monero-python.readthedocs.io/en/latest/quickstart.html I am using the same command for both "from monero.wallet import Wallet" vs "from .monero_python_master.monero.wallet import Wallet" why do they work differently

  • Probably because you followed the instructions, which have you install the library in a venv. This is really a Python question, not Monero.
    – jtgrassie
    Feb 13, 2020 at 0:09

2 Answers 2


This is more of a generic Python question. And the docs are wrong. The last line should be .venv/bin/pytest. I'll correct that.

Also you may just install pysha3 (and other required modules) system-wide from packages that come with your OS. Then you may disregard all lines referencing to .venv


thanks for the response you got me looking in the right place with the global install i found that there was two version of python on my device 2.7 and 3.6.9 I am posting the fix for other people. you need to make sure that pip is running by pyhton3 and not the default python. To do this you need to put python3 in front in general.

pip install -r requirements.txt -r test_requirements.txt


python3 -m pip install -r requirements.txt -r test_requirements.txt
  • Python 2 is not supported since 2020-01-01 and it seems your device is quite outdated if it still has Python 2 as the default. Anyway, this is a system-specific issue and different distributors chose different approaches to Python interpreter versioning. Nevertheless, monero-pytohn will support 2.x as long as it's feasible and doesn't require big investment in keeping the compatibility.
    – emesik
    Feb 18, 2020 at 9:45

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.