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

Error when trying to install neo-mamba on alpine:3.16 #294

Closed
yogh333 opened this issue Nov 27, 2023 · 19 comments
Closed

Error when trying to install neo-mamba on alpine:3.16 #294

yogh333 opened this issue Nov 27, 2023 · 19 comments

Comments

@yogh333
Copy link

yogh333 commented Nov 27, 2023

Hello,

I have issues when trying to install neo-mamba on Alpine 3.16 (with Python 3.10.13):

  1. From pypi package: pip install neo-mamba =>
.../...
 Created wheel for lz4: filename=lz4-2.2.1-cp310-cp310-linux_aarch64.whl size=1152885 sha256=3e998db7034d3f8e60486670ca65db2620a5ae9b8d040c09a86aca983e8472ef
  Stored in directory: /tmp/pip-ephem-wheel-cache-e29pflf6/wheels/00/b2/5d/0a429d46ce01f018dea9f982ded26ecf8d9533b63878911379
  Building wheel for mmh3 (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'mmh3' extension
      creating build
      creating build/temp.linux-aarch64-cpython-310
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -g -g -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python3.10 -c MurmurHash3.cpp -o build/temp.linux-aarch64-cpython-310/MurmurHash3.o
      gcc: fatal error: cannot execute 'cc1plus': execvp: No such file or directory
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mmh3
  Running setup.py clean for mmh3
  Building wheel for plyvel (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-310
      creating build/lib.linux-aarch64-cpython-310/plyvel
      copying plyvel/__init__.py -> build/lib.linux-aarch64-cpython-310/plyvel
      copying plyvel/_version.py -> build/lib.linux-aarch64-cpython-310/plyvel
      running build_ext
      building 'plyvel._plyvel' extension
      creating build/temp.linux-aarch64-cpython-310
      creating build/temp.linux-aarch64-cpython-310/plyvel
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -g -g -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python3.10 -c plyvel/_plyvel.cpp -o build/temp.linux-aarch64-cpython-310/plyvel/_plyvel.o -Wall -g -x c++ -std=c++11
      gcc: warning: '-x c++' after last input file has no effect
      gcc: fatal error: cannot execute 'cc1plus': execvp: No such file or directory
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for plyvel
  Running setup.py clean for plyvel
  Building wheel for bitcoin (setup.py) ... done
  Created wheel for bitcoin: filename=bitcoin-1.1.42-py3-none-any.whl size=44402 sha256=b8128d600d767cca2842403ea2606f5fe00a51e4f3c077642f88adb8cd3cdd14
  Stored in directory: /tmp/pip-ephem-wheel-cache-e29pflf6/wheels/a3/98/a1/0d53f5b714680bb5dffc2db778c221b1f5c54bc4a3a779c8c5
Successfully built bitarray coverage Events lz4 bitcoin
Failed to build mmh3 plyvel
ERROR: Could not build wheels for mmh3, plyvel, which is required to install pyproject.toml-based projects
  1. From sources pip install -e .
.../...
Collecting lz4==4.3.2 (from neo-mamba==2.2.0)
  Downloading lz4-4.3.2.tar.gz (170 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 170.9/170.9 kB 4.5 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
INFO: pip is looking at multiple versions of neo-mamba to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement neo3crypto==0.4 (from neo-mamba) (from versions: none)
ERROR: No matching distribution found for neo3crypto==0.4

Thanks for your feedback

@ixje
Copy link
Member

ixje commented Nov 27, 2023

The PyPi install errors are surprising as it tries to install mmh3 and plyvel. The latter has not been a dependency since v1.0.0 more than a year ago.

I can add aarch64 wheel building to the neo3crypto package. I'll ping when it's up for you to try

@yogh333
Copy link
Author

yogh333 commented Nov 27, 2023

For your information, I am running a Docker container based on alpine:3.16 on a Mac M1

@ixje
Copy link
Member

ixje commented Nov 27, 2023

oof building with QEMU is really slow. Can you try out the wheel in this release? Will be nice to know it's working fine before publishing to PyPi. If it works I then I'll add the same builds to the pybiginteger dependency.

@yogh333
Copy link
Author

yogh333 commented Nov 27, 2023

Just a question: how can I try out the wheel in the provided release ?
What shall I do before pip install neo-mamba?

@ixje
Copy link
Member

ixje commented Nov 27, 2023

ah yes good point. There is some example code in the readme of the project that you can run to verify it's working. So pip install <wheelname> and then run the example code.

@yogh333
Copy link
Author

yogh333 commented Nov 27, 2023

Sorry but I have tried:

pip install neo3crypto-0.4.1-cp310-cp310-musllinux_1_1_aarch64.whl
pip install neo-mamba

but still an issue with plyvel

Also tried other *_aarch64 wheels but unable to install them....

@yogh333
Copy link
Author

yogh333 commented Nov 27, 2023

ooops, sorry I have tried also:

pip install neo3crypto-0.4.1-cp310-cp310-musllinux_1_1_aarch64.whl

and the example you have mentioned and it looks to be ok (except I am missing the ecdsa package, so was unable to verify the signature).

When adding ecdsa import:

assert ecdsa.verify(signature, b'message', public_key, hashlib.sha256) == True
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'ecdsa' has no attribute 'verify'

@ixje
Copy link
Member

ixje commented Nov 27, 2023

First one to point out the broken example. Anyway, if you were able to run the code before that line then that's already a good sign. I'll publish the updated neo3crypto package, update the pybiginteger dependency with aarch64 builds + publish and update the versions here. Then we can try again to at least get it working from source. After that I can have a look at why pip install neo-mamba is trying to give you a really old version with dependencies that are no longer relevant

@ixje
Copy link
Member

ixje commented Nov 27, 2023

can you pull the latest source and try pip install . from the root?

@ixje
Copy link
Member

ixje commented Nov 27, 2023

no neo-mamba source

@yogh333
Copy link
Author

yogh333 commented Nov 27, 2023

ok it works from neo-mamba sources 🥳

@ixje
Copy link
Member

ixje commented Nov 27, 2023

yay! Mind if I ping you one more time to test pip install neo-mamba after I've done a release to PyPi?

@yogh333
Copy link
Author

yogh333 commented Nov 27, 2023

yay! Mind if I ping you one more time to test pip install neo-mamba after I've done a release to PyPi?

No pb, ping me when it is done

@yogh333
Copy link
Author

yogh333 commented Nov 28, 2023

Hello, any update about neo-mamba release to PyPi ?

@ixje
Copy link
Member

ixje commented Nov 28, 2023

I was hoping to add musllinux_x86_64 in the same release but am still waiting on a response from the lz4 people for adding wheels. I'll do a release without it in an hour or so

@yogh333
Copy link
Author

yogh333 commented Nov 28, 2023

Ok no pb, if you think it is cleaner and relevant to add musllinux_x86_64 , we can wait for lz4 people answer.

@ixje
Copy link
Member

ixje commented Nov 28, 2023

pip install neo-mamba should now give you version 2.3.0 and work out of the box

@yogh333
Copy link
Author

yogh333 commented Nov 28, 2023

And it works fine 🥳
Thanks !

@ixje
Copy link
Member

ixje commented Nov 28, 2023

Thanks for testing! 👍

@ixje ixje closed this as completed Nov 28, 2023
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