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

Can't install on a Mac mini with M2 #59

Open
pwa-tapptic opened this issue Jun 6, 2023 · 1 comment
Open

Can't install on a Mac mini with M2 #59

pwa-tapptic opened this issue Jun 6, 2023 · 1 comment

Comments

@pwa-tapptic
Copy link

Hello. I try to install it on a Mac mini with M2 and there is an issue due to your definition of dependency to cryptography

I run just pip install appstoreconnect, and get this:

× Building wheel for cryptography (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [142 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-13-arm64-cpython-39
      creating build/lib.macosx-13-arm64-cpython-39/cryptography
      [...]
      writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
      running build_ext
      generating cffi module 'build/temp.macosx-13-arm64-cpython-39/_padding.c'
      creating build/temp.macosx-13-arm64-cpython-39
      generating cffi module 'build/temp.macosx-13-arm64-cpython-39/_constant_time.c'
      generating cffi module 'build/temp.macosx-13-arm64-cpython-39/_openssl.c'
      building '_openssl' extension
      creating build/temp.macosx-13-arm64-cpython-39/build
      creating build/temp.macosx-13-arm64-cpython-39/build/temp.macosx-13-arm64-cpython-39
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c build/temp.macosx-13-arm64-cpython-39/_openssl.c -o build/temp.macosx-13-arm64-cpython-39/build/temp.macosx-13-arm64-cpython-39/_openssl.o -Wconversion -Wno-error=sign-conversion
      build/temp.macosx-13-arm64-cpython-39/_openssl.c:575:10: fatal error: 'openssl/opensslv.h' file not found
      #include <openssl/opensslv.h>
               ^~~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' 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 cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects

When it comes to my env:

pip --version
pip 23.1.2 from /opt/homebrew/lib/python3.9/site-packages/pip (python 3.9)
@chwo
Copy link

chwo commented Jun 19, 2023

I ran into the same issue on a M1 Max Mac.

  • MacOS 13.4 (22F66)
  • Python version 3.11.3
  • pip version 23.1.2

I solved it based on https://stackoverflow.com/a/72022463 by using the following exports before running pip install appstoreconnect:

export LDFLAGS="-L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib -L$(brew --prefix [email protected])/lib -L$(brew --prefix libffi)/lib"
export CPPFLAGS="-I$(brew --prefix zlib)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix [email protected])/include -I$(brew --prefix libffi)/include"
export PKG_CONFIG_PATH="$(brew --prefix [email protected])/lib/pkgconfig:$(brew --prefix libffi)/lib/pkgconfig"

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