Skip to content

M1 Pro pip installation errorΒ #282

@konchunas

Description

@konchunas

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    πŸ‘‹ communityReported or suggested by our awesome users🚒 ci/cdDockerfiles, GitHub Actions and stuff like that🀷 not a bugFramework behaves as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions