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

Guide on Building an App needs additional requirements #1966

Open
montsamu opened this issue Jan 8, 2021 · 1 comment
Open

Guide on Building an App needs additional requirements #1966

montsamu opened this issue Jan 8, 2021 · 1 comment

Comments

@montsamu
Copy link

montsamu commented Jan 8, 2021

  • py-evm Version: 0.3.0a20
  • OS: ubuntu (on windows linux subsystem)
  • Python Version (python --version): 3.6.9
  • Environment (output of pip freeze):

(venv) samont@l10c367:~$ pip freeze
blake2b-py==0.1.3
cached-property==1.5.2
cytoolz==0.11.0
eth-bloom==1.0.3
eth-hash==0.2.0
eth-keys==0.3.3
eth-typing==2.2.2
eth-utils==1.9.5
hexbytes==0.2.1
lru-dict==1.1.6
mypy-extensions==0.4.3
py-ecc==4.1.0
py-evm==0.3.0a20
pyethash==0.1.27
rlp==2.0.1
sortedcontainers==2.3.0
toolz==0.11.1
trie==2.0.0a5
typing-extensions==3.7.4.3

What is wrong?

Using the guide here:

https://py-evm.readthedocs.io/en/latest/guides/building_an_app_that_uses_pyevm.html

When running the app, eventually eth_hash/utils.py fails in choose_available_backend with:

ImportError: None of these hashing backends are installed: ['pycryptodome', 'pysha3'].
Install with pip install eth-hash[pycryptodome].

How can it be fixed

Include additional requirement in the 'add the py-evm library as a dependency' section, or include one of the hashing backends in py-evm's own requirements.

Example:

pip install eth-hash[pysha3]

Then running the app/main.py does give the expected result. I am happy to make this (tiny) fix to the guide, however if it is better to include this as a dependency of py-evm itself that would require further discussion of course.

@cburgdorf
Copy link
Contributor

am happy to make this (tiny) fix to the guide

That would be appreciated

however if it is better to include this as a dependency of py-evm itself that would require further discussion of course.

It is omitted by design so that the user get to choose which kind of hashing backend they want to choose (e.g. a fast native one for production vs a python one for learning purpose)

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

2 participants