Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 'rlp<3,>=1.0.0' distribution was not found and is required by eth-account #118

Open
0xharold opened this issue Sep 20, 2022 · 12 comments

Comments

@0xharold
Copy link

0xharold commented Sep 20, 2022

I am trying to follow the Quickstart for Docker but once I run the command etheno --truffle --ganache --manticore --manticore-max-depth 2 --manticore-script ExploitMetaCoinManticoreScript.py I get the following error:

etheno@f7c39ca71ae1:~/examples/BrokenMetaCoin$ etheno --truffle --ganache --manticore --manticore-max-depth 2 --manticore-script ExploitMetaCoinManticoreScript.py
Traceback (most recent call last):
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 573, in _build_master
    ws.require(__requires__)
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 891, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 782, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (rlp 3.0.0 (/home/etheno/.local/lib/python3.6/site-packages), Requirement.parse('rlp<3,>=1.0.0'), {'eth-account'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/etheno/.local/bin/etheno", line 33, in <module>
    sys.exit(load_entry_point('etheno==0.2.4', 'console_scripts', 'etheno')())
  File "/home/etheno/.local/bin/etheno", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/home/etheno/.local/lib/python3.6/site-packages/importlib_metadata/__init__.py", line 194, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/__init__.py", line 1, in <module>
    from .etheno import Etheno, EthenoPlugin
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/etheno.py", line 1, in <module>
    import pkg_resources
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3266, in <module>
    @_call_aside
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3241, in _call_aside
    f(*args, **kwargs)
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3279, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 575, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 588, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 777, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'rlp<3,>=1.0.0' distribution was not found and is required by eth-account

Could anyone help me with the resolving the issue, please?

Using:
WSL2 at Win11 Home
VSC
Docker 20.10.14;
Ubuntu

@0xharold
Copy link
Author

0xharold commented Sep 20, 2022

I also tried to follow the instructions for native installation of Etheno. Once I run etheno --manticore --ganache --truffle I got:

ERROR    [09-20|15:20:39][Etheno] Manticore is not installed! Running Etheno with Manticore requires Manticore version 0.2.2 or newer. Reinstall Etheno with Manticore support by running `pip3 install --user 'etheno[manticore]'`, or install Manticore separately with `pip3 install --user 'manticore'`

So I followed the instructions and run pip3 install --user 'manticore but got another error saying that I need to update crytic-compiler:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
slither-analyzer 0.8.3 requires crytic-compile>=0.2.3, but you have crytic-compile 0.2.2 which is incompatible.

So, I tried to run pip3 install crytic-compile --upgrade but got an error saying that I need to downgrade crytic-compile:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
manticore 0.3.7 requires crytic-compile==0.2.2, but you have crytic-compile 0.2.3 which is incompatible.
Successfully installed crytic-compile-0.2.3

Then I tried to upgrade the mantigore by running pip3 install --user 'etheno[manticore]' --upgrade but got another error:

Installing collected packages: crytic-compile
  Attempting uninstall: crytic-compile
    Found existing installation: crytic-compile 0.2.3
    Uninstalling crytic-compile-0.2.3:
      Successfully uninstalled crytic-compile-0.2.3
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
slither-analyzer 0.8.3 requires crytic-compile>=0.2.3, but you have crytic-compile 0.2.2 which is incompatible.
Successfully installed crytic-compile-0.2.2

It seems like an infinitive error to me.

@anishnaik
Copy link
Contributor

Hi @lubos-harasta, apologies for the delayed response. What version of etheno are you using? Type etheno --version to find out.

@0xharold
Copy link
Author

Hi @anishnaik,
no worries;
I found some other different recent issue with etheno in one of the slack channels and it was recommended to upgrade etheno by running comand pip install etheno==0.3a1. I did that and since than it seems to be working. I have not tried that for docker though.

@anishnaik
Copy link
Contributor

Hi @lubos-harasta that was going to be my next recommendation :) Let me know if you have any issues with the binary or with docker. I am going to close this issue - feel free to re-open (or make a new issue) if you have any problems.

@0xharold
Copy link
Author

@anishnaik
Hi again, so I tried to run etheno in docker as stated above and it returns the same error. Any idea what to do?

@elopez
Copy link
Member

elopez commented Sep 30, 2022

Hi @lubos-harasta, which docker container tag are you using? Please give v0.3a1 a try if you were using something else or not specifying a tag:

https://github.com/crytic/etheno/pkgs/container/etheno%2Fetheno/27899969?tag=v0.3a1

@0xharold
Copy link
Author

Hi @elopez, still the same.
What have I done is the following:

  1. pulled the image
docker pull ghcr.io/crytic/etheno/etheno:v0.3a1
  1. checked that docker images:
REPOSITORY                         TAG             IMAGE ID       CREATED        SIZE
trailofbits/etheno                 v0.3a1          2b78a723a4b3   2 months ago   840MB
ghcr.io/crytic/etheno/etheno       v0.3a1          2b78a723a4b3   2 months ago   840MB
trailofbits/etheno                 latest          0a499f122168   3 months ago   1.32GB
  1. followed the instructions again:
docker run -it trailofbits/etheno

etheno@165bb21886bb:~$ cd examples/BrokenMetaCoin/
etheno@165bb21886bb:~/examples/BrokenMetaCoin$ etheno --truffle --ganache --manticore --manticore-max-depth 2 --manticore-script ExploitMetaCoinManticoreScript.py

and got the same result (note I am working in Ubuntu in WSL, docker runs in WIN if it helps):

Traceback (most recent call last):
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 573, in _build_master
    ws.require(__requires__)
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 891, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 782, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (rlp 3.0.0 (/home/etheno/.local/lib/python3.6/site-packages), Requirement.parse('rlp<3,>=1.0.0'), {'eth-account'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/etheno/.local/bin/etheno", line 33, in <module>
    sys.exit(load_entry_point('etheno==0.2.4', 'console_scripts', 'etheno')())
  File "/home/etheno/.local/bin/etheno", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/home/etheno/.local/lib/python3.6/site-packages/importlib_metadata/__init__.py", line 194, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/__init__.py", line 1, in <module>
    from .etheno import Etheno, EthenoPlugin
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/etheno.py", line 1, in <module>
    import pkg_resources
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3266, in <module>
    @_call_aside
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3241, in _call_aside
    f(*args, **kwargs)
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3279, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 575, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 588, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 777, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'rlp<3,>=1.0.0' distribution was not found and is required by eth-account

if I use docker container tag, there I get the following:

$ docker run -it trailofbits/etheno:v0.3a1
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

etheno@b12a44fbb7fb:~$ ls
etheno@b12a44fbb7fb:~$ cd examples/
bash: cd: examples/: No such file or directory
etheno@b12a44fbb7fb:~$

@anishnaik
Copy link
Contributor

anishnaik commented Sep 30, 2022

Hi @lubos-harasta I would recommend checking out the README in the rc-1 branch. The concern here is that docker works as an isolated system and does not have knowledge of the examples/ folder that sits on your local filesystem. To be able to map that folder you need to create a "volume" so that the docker container has that folder has well. You can learn more about volumes here: https://docs.docker.com/storage/volumes/

More importantly, as mentioned in the rc-1 branch README and CHANGELOG, Manticore is no longer supported natively by etheno. So the examples/ folder actually does not exist anymore.

So the larger point here is that if you want to use Manticore via Etheno it is no longer supported.

@anishnaik anishnaik reopened this Sep 30, 2022
@0xharold
Copy link
Author

@anishnaik
thanks a lot for your feedback, I will get back to it during the next week though. Thanks for you patience

@0xharold
Copy link
Author

0xharold commented Oct 3, 2022

As the last response from @anishnaik I am closing this issue.

@0xharold 0xharold closed this as completed Oct 3, 2022
@whackur
Copy link

whackur commented Oct 26, 2022

I failed to run command on Windows terminal

docker run -it -v %cd%:/tmp --rm --name etheno ghcr.io/crytic/etheno/etheno:v0.3a1

I mapped volume and example directory.

Error message is displayed like below.

In 'etheno:v0.3a1' container

etheno@22ddc5d573c5:/tmp/BrokenMetaCoin$ etheno --truffle --ganache --manticore --manticore-max-depth 2 --manticore-script ExploitMetaCoinManticoreScript.py
etheno: error: unrecognized arguments: --manticore --manticore-max-depth --manticore-script ExploitMetaCoinManticoreScript.py

also I cannot even use help option from original image

In ' trailofbits/etheno'

etheno@cbd1a8b1b8c4:~$ etheno -h
Traceback (most recent call last):
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 573, in _build_master
    ws.require(__requires__)
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 891, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 782, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (rlp 3.0.0 (/home/etheno/.local/lib/python3.6/site-packages), Requirement.parse('rlp<3,>=1.0.0'), {'eth-account'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/etheno/.local/bin/etheno", line 33, in <module>
    sys.exit(load_entry_point('etheno==0.2.4', 'console_scripts', 'etheno')())
  File "/home/etheno/.local/bin/etheno", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/home/etheno/.local/lib/python3.6/site-packages/importlib_metadata/__init__.py", line 194, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/__init__.py", line 1, in <module>
    from .etheno import Etheno, EthenoPlugin
  File "/home/etheno/.local/lib/python3.6/site-packages/etheno/etheno.py", line 1, in <module>
    import pkg_resources
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3266, in <module>
    @_call_aside
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3241, in _call_aside
    f(*args, **kwargs)
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3279, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 575, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 588, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/home/etheno/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 777, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'rlp<3,>=1.0.0' distribution was not found and is required by eth-account

@anishnaik
Copy link
Contributor

Hey @whackur apologies for the delayed response.

So with regards to your first issue with running etheno, note as mentioned above in this issue, as of 0.3a1, we no longer support the manticore integration which is why you are getting the unrecognized arguments error.

With regards to the second concern, I am unable to reproduce it on my Mac so I will do a bit more debugging and get back to you.

@anishnaik anishnaik reopened this Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants