ApeWorX / ape

The smart contract development tool for Pythonistas, Data Scientists, and Security Professionals
https://apeworx.io
Apache License 2.0
899 stars 135 forks source link

blocker: Ubuntu 20.04LTS Raspberry Pi `pip install eth-ape` fails at requirement `blake2b-py` with `ERROR: Could not find a version` #101

Open sabotagebeats opened 3 years ago

sabotagebeats commented 3 years ago

Environment information

What went wrong?

$ pip install eth-ape
[truncated]
Collecting eth-bloom<2.0.0,>=1.0.3
  Downloading eth_bloom-1.0.4-py3-none-any.whl (5.4 kB)
ERROR: Could not find a version that satisfies the requirement blake2b-py<0.2,>=0.1.4 (from py-evm==0.4.0a4; extra == "py-evm"->eth-tester[py-evm]==v0.5.0-beta.4; extra == "tester"->web3[tester]<6.0.0,>=5.18.0->eth-ape) (from versions: 0.1.2, 0.1.3)
ERROR: No matching distribution found for blake2b-py<0.2,>=0.1.4 (from py-evm==0.4.0a4; extra == "py-evm"->eth-tester[py-evm]==v0.5.0-beta.4; extra == "tester"->web3[tester]<6.0.0,>=5.18.0->eth-ape)

How can it be fixed?

looks like a version issue with blake2b-py

fubuloubu commented 3 years ago

watch https://github.com/ethereum/py-evm/pull/2021 for the release of the fix upstream that makes blake2b-py an optional dependency

carver commented 3 years ago

I think you have the wrong PR @fubuloubu

fubuloubu commented 3 years ago

@carver you linked me to PR 2021 here: https://github.com/ethereum/py-evm/pull/2012#issuecomment-912625225

That release is a blocker for Windows support since no blake2b-py distributions exist for Windows.

As of PR 2012 being merged, the install is now optional, however it is not released yet through PyPI

carver commented 3 years ago

Ah, right I remember now. It's not that that PR has anything to do with blake2b-py, just that it is blocking the next release of py-evm. 👍🏻

antazoey commented 2 years ago

rlp got released in a few months after this... @sabotagebeats Are we able to close this issue? Does it work on the Raspberry pi now?

sabotagebeats commented 2 years ago

rlp got released in a few months after this... @sabotagebeats Are we able to close this issue? Does it work on the Raspberry pi now?

I'll give it a shot and see if it works :)

sabotagebeats commented 2 years ago
generating cffi module 'build/temp.linux-armv7l-cpython-37/pygit2._libgit2.c'
  creating build/temp.linux-armv7l-cpython-37
  building 'pygit2._pygit2' extension
  creating build/temp.linux-armv7l-cpython-37/src
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -I/usr/local/include -I/usr/include/python3.7m -c src/blob.c -o build/temp.linux-armv7l-cpython-37/src/blob.o
  In file included from src/blob.c:30:
  src/diff.h:33:10: fatal error: git2.h: No such file or directory
   #include <git2.h>
            ^~~~~~~~
  compilation terminated.
  error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1

  ----------------------------------------
  Failed building wheel for pygit2

I ran into this error while building but then hangs on numpy install

antazoey commented 2 years ago

Failed building wheel for pygit2

git is required to install ape I think. Is git installed on your rasp pi?

sabotagebeats commented 2 years ago

Failed building wheel for pygit2

git is required to install ape I think. Is git installed on your rasp pi?

yes git is, and then in the end the process fails with

flto -fuse-linker-plugin -ffat-lto-objects -fPIC -I/usr/local/include -I/usr/include/python3.7m -c src/blob.c -o build/temp.linux-armv7l-cpython-37/src/blob.o
    In file included from src/blob.c:30:
    src/diff.h:33:10: fatal error: git2.h: No such file or directory
     #include <git2.h>
              ^~~~~~~~
    compilation terminated.
    error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-lt0oifiz/pygit2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-d7m_32ih/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-lt0oifiz/pygit2/
antazoey commented 2 years ago

It needs libgit2 so you'd have to instal that first

sabotagebeats commented 2 years ago

I've figured out this is because libffi7 is not installed because it requires libgcc-s1. working on these issues and will try to produce reproducible steps if I can get this to work.