No module named 'rlp.codec'
See original GitHub issue- py-evm Version: xxx
- trinity Version:eth-0.2.0a31
- OS: osx
- Python Version (python --version): Python 3.6.4 :: Anaconda, Inc.
- Environment (output of
pip freeze
):
alabaster==0.7.11 apipkg==1.5 appnope==0.1.0 argh==0.26.2 asn1crypto==0.24.0 async-lru==0.1.0 asyncio-cancel-token==0.1.0a2 atomicwrites==1.2.1 attrdict==2.0.0 attrs==18.1.0 Babel==2.6.0 backcall==0.1.0 bloom-filter==1.3 bumpversion==0.5.3 cachetools==2.1.0 certifi==2018.8.24 cffi==1.11.5 chardet==3.0.4 coincurve==8.0.2 colorama==0.3.9 coverage==4.5.1 cryptography==2.3.1 cytoolz==0.9.0.1 decorator==4.3.0 docopt==0.6.2 docutils==0.14 eth-abi==1.2.0 eth-account==0.2.3 eth-bloom==1.0.0 eth-hash==0.1.4 eth-keyfile==0.5.1 eth-keys==0.2.0b3 eth-rlp==0.1.2 eth-typing==1.3.0 eth-utils==1.2.1 execnet==1.5.0 flake8==3.5.0 hexbytes==0.1.0 hypothesis==3.69.5 idna==2.7 imagesize==1.0.0 ipython==6.5.0 ipython-genutils==0.2.0 jedi==0.12.1 Jinja2==2.10 lahja==0.6.1 lru-dict==1.1.6 lxml==4.2.4 MarkupSafe==1.0 mccabe==0.6.1 more-itertools==4.3.0 mypy==0.620 netdisco==2.0.0 netifaces==0.10.7 packaging==17.1 parsimonious==0.8.0 parso==0.3.1 pathtools==0.1.2 pexpect==4.6.0 pickleshare==0.7.4 pkginfo==1.4.2 pluggy==0.7.1 plyvel==1.0.5 prompt-toolkit==1.0.15 ptyprocess==0.6.0 py==1.6.0 py-ecc==1.4.3 -e git+git@github.com:ethereum/py-evm.git@632bf8a710d8bfc2f20e7d25f9976f9bcd25ff51#egg=py_evm pycodestyle==2.3.1 pycparser==2.18 pycryptodome==3.6.6 pyethash==0.1.27 pyflakes==1.6.0 Pygments==2.2.0 pyparsing==2.2.0 pysha3==1.0.2 pytest==3.6.4 pytest-asyncio==0.9.0 pytest-asyncio-network-simulator==0.1.0a2 pytest-cov==2.5.1 pytest-watch==4.2.0 pytest-xdist==1.18.1 python-dateutil==2.7.3 pytz==2018.5 PyYAML==3.13 requests==2.19.1 requests-toolbelt==0.8.0 rlp==1.0.2 simplegeneric==0.8.1 six==1.11.0 snowballstemmer==1.2.1 Sphinx==1.7.8 sphinx-rtd-theme==0.4.1 sphinxcontrib-asyncio==0.2.0 sphinxcontrib-websupport==1.1.0 toolz==0.9.0 tox==2.7.0 tqdm==4.25.0 traitlets==4.3.2 trie==1.3.8 twine==1.11.0 typed-ast==1.1.0 uPnPClient==0.0.8 urllib3==1.23 virtualenv==16.0.0 watchdog==0.9.0 wcwidth==0.1.7 web3==4.4.1 websockets==5.0.1 zeroconf==0.20.0
What is wrong?
i want to read and run the trinity code, but the always show error
No module named 'rlp.codec'
There is a rlp folder under the trinity directory
how import rlp from site-packages
not the rlp folder?
(py-evm-VXvi0lYJ) ➜ py-evm git:(master) ✗ python trinity/main.py
Traceback (most recent call last):
File "trinity/main.py", line 18, in <module>
from eth.chains.mainnet import (
File "/Users/gaojin/Documents/GitHub/py-evm/eth/__init__.py", line 14, in <module>
from eth.chains import ( # noqa: F401
File "/Users/gaojin/Documents/GitHub/py-evm/eth/chains/__init__.py", line 1, in <module>
from .base import ( # noqa: F401
File "/Users/gaojin/Documents/GitHub/py-evm/eth/chains/base.py", line 46, in <module>
from eth.db.chain import (
File "/Users/gaojin/Documents/GitHub/py-evm/eth/db/chain.py", line 18, in <module>
from trie import (
File "/Users/gaojin/.local/share/virtualenvs/py-evm-VXvi0lYJ/lib/python3.6/site-packages/trie/__init__.py", line 7, in <module>
from .hexary import ( # noqa: F401
File "/Users/gaojin/.local/share/virtualenvs/py-evm-VXvi0lYJ/lib/python3.6/site-packages/trie/hexary.py", line 5, in <module>
from rlp.codec import encode_raw
ModuleNotFoundError: No module named 'rlp.codec'
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (12 by maintainers)
Thank you very much, this is very helpful to me.
Ah, understood! No, running
python trinity/main.py
doesn’t work for me either. I’m also running into:Btw, notice that this kind of launch would also need this to be added:
However, I don’t know where this error comes from and I know that this kind of launch used to work a couple of months back. However, if you really want to start trinity using
python <something>
instead of just launching it through thetrinity
command, you can do so by runningpython -m trinity.main
which will give you a bunch of warnings but beside that will launch trinity just fine.I’m far from being a Python expert so I can’t explain to you the details of why things are the way they are but I hope this gives you the right pointers to address your problem.