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

M1 Pro pip installation error #282

Open
konchunas opened this issue Jan 12, 2022 · 3 comments
Open

M1 Pro pip installation error #282

konchunas opened this issue Jan 12, 2022 · 3 comments
Labels
🚢 ci/cd Dockerfiles, GitHub Actions and stuff like that 👋 community Reported or suggested by our awesome users 🤷 not a bug Framework behaves as expected

Comments

@konchunas
Copy link

I had a hard time installing onto M1 machine. It always results in secp256k1 and gmp can't find either include or lib paths. Even if I have them installed using brew according to documentation.

The only way I managed to install pytezos it is by adding some environment variables with paths like so:

CFLAGS="-I/opt/homebrew/Cellar/gmp/6.2.1_1/include/ -L/opt/homebrew/Cellar/gmp/6.2.1_1/lib/" LIB_DIR="/opt/homebrew/Cellar/libsecp256k1/0.1/lib" INCLUDE_DIR=/opt/homebrew/Cellar/libsecp256k1/0.1/include pip3 install --user pytezos

This was enough to install, but no enough to run pytest.
I had to add LD_LIBRARY_PATH=/opt/homebrew/lib/ to my env so it can find libsodium when executing pytest.

It all seems to be related to the fact that brew installs all ARM libraries to /opt/homebrew/ and x64 to /usr/local/. And /usr/local/ is always in the default paths for C compiler while /opt/homebrew/ is not.

I am confident the same result can be achieved more elegantly. That's why I'm not sure if it is wise to include this to the documentation yet.

@m-kus m-kus self-assigned this Jan 12, 2022
@m-kus m-kus pinned this issue Mar 26, 2022
@tbinetruy
Copy link

Thanks for your feedback, greatly helpful ! Unfortunately, somehow, we're still not managing to import pytezos on one of our dev's M1. Pytezos installs fine but cannot find libsodium. We'll look into it sometime when we can, until then, I'm making a docker compose, hopefully that works, and otherwise, I guess we'll Ubuntu VM it from the M1....

@m-kus m-kus removed their assignment Jul 31, 2022
@tbinetruy
Copy link

Ok, on some macos systems, you need to export DYLD_LIBRARY_PATH=/opt/homebrew/lib/ rather than LD_LIBRARY_PATH ;)

@droserasprout droserasprout added 🤷 not a bug Framework behaves as expected 👋 community Reported or suggested by our awesome users 🚢 ci/cd Dockerfiles, GitHub Actions and stuff like that labels Sep 14, 2022
@m-kus
Copy link
Member

m-kus commented Jul 31, 2023

Another workaround by @grum-tez
https://tezos.stackexchange.com/questions/6194/unable-to-find-libsodium-issue-with-pytezos
https://github.com/grum-tez/pyTezosDC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚢 ci/cd Dockerfiles, GitHub Actions and stuff like that 👋 community Reported or suggested by our awesome users 🤷 not a bug Framework behaves as expected
Projects
None yet
Development

No branches or pull requests

4 participants