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

Does not install on Aarch64 (arm64) macOS #5872

Open
joewill01 opened this issue Nov 18, 2020 · 5 comments
Open

Does not install on Aarch64 (arm64) macOS #5872

joewill01 opened this issue Nov 18, 2020 · 5 comments

Comments

@joewill01
Copy link

joewill01 commented Nov 18, 2020

clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-10.14.6-arm64-3.8/c/_cffi_backend.o
      c/_cffi_backend.c:5854:2: error: Apple Arm64 ABI requires ffi_prep_cif_var
      #error Apple Arm64 ABI requires ffi_prep_cif_var
       ^
      c/_cffi_backend.c:6304:9: error: implicit declaration of function 'ffi_prep_closure' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          if (ffi_prep_closure(closure, &cif_descr->cif,
              ^
      2 errors generated.
      error: command 'clang' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-9she3k6p/cffi/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-9she3k6p/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-imoj5bub/install-record.txt --single-version-externally-managed --prefix /private/tmp/pip-build-env-3rzi11hg/overlay --compile --install-headers /private/tmp/pip-build-env-3rzi11hg/overlay/include/python3.8/cffi Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Python/3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-3rzi11hg/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.0' Check the logs for full command output.

Python 3.8, MacBook Air 2020, M1 processor
@joewill01
Copy link
Author

joewill01 commented Nov 18, 2020

Whole pip output

Collecting jupyter
  Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
Collecting jupyter-console
  Downloading jupyter_console-6.2.0-py3-none-any.whl (22 kB)
Collecting notebook
  Downloading notebook-6.1.5-py3-none-any.whl (9.5 MB)
     |████████████████████████████████| 9.5 MB 8.3 MB/s 
Collecting qtconsole
  Downloading qtconsole-4.7.7-py2.py3-none-any.whl (118 kB)
     |████████████████████████████████| 118 kB 16.4 MB/s 
Collecting nbconvert
  Downloading nbconvert-6.0.7-py3-none-any.whl (552 kB)
     |████████████████████████████████| 552 kB 15.2 MB/s 
Collecting ipywidgets
  Downloading ipywidgets-7.5.1-py2.py3-none-any.whl (121 kB)
     |████████████████████████████████| 121 kB 8.5 MB/s 
Collecting ipykernel
  Downloading ipykernel-5.3.4-py3-none-any.whl (120 kB)
     |████████████████████████████████| 120 kB 11.4 MB/s 
Collecting jupyter-client
  Downloading jupyter_client-6.1.7-py3-none-any.whl (108 kB)
     |████████████████████████████████| 108 kB 13.1 MB/s 
Collecting ipython
  Downloading ipython-7.19.0-py3-none-any.whl (784 kB)
     |████████████████████████████████| 784 kB 12.9 MB/s 
Collecting pygments
  Downloading Pygments-2.7.2-py3-none-any.whl (948 kB)
     |████████████████████████████████| 948 kB 8.5 MB/s 
Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
  Downloading prompt_toolkit-3.0.8-py3-none-any.whl (355 kB)
     |████████████████████████████████| 355 kB 10.0 MB/s 
Collecting nbformat
  Downloading nbformat-5.0.8-py3-none-any.whl (172 kB)
     |████████████████████████████████| 172 kB 6.0 MB/s 
Collecting traitlets>=4.2.1
  Downloading traitlets-5.0.5-py3-none-any.whl (100 kB)
     |████████████████████████████████| 100 kB 8.9 MB/s 
Collecting terminado>=0.8.3
  Downloading terminado-0.9.1-py3-none-any.whl (13 kB)
Collecting prometheus-client
  Downloading prometheus_client-0.9.0-py2.py3-none-any.whl (53 kB)
     |████████████████████████████████| 53 kB 12.2 MB/s 
Collecting Send2Trash
  Downloading Send2Trash-1.5.0-py3-none-any.whl (12 kB)
Collecting tornado>=5.0
  Downloading tornado-6.1.tar.gz (497 kB)
     |████████████████████████████████| 497 kB 8.4 MB/s 
Collecting jupyter-core>=4.6.1
  Downloading jupyter_core-4.7.0-py3-none-any.whl (82 kB)
     |████████████████████████████████| 82 kB 10.8 MB/s 
Collecting argon2-cffi
  Downloading argon2-cffi-20.1.0.tar.gz (1.8 MB)
     |████████████████████████████████| 1.8 MB 8.2 MB/s 
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Python/3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-3rzi11hg/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.0'
       cwd: None
  Complete output (107 lines):
  WARNING: The directory '/Users/joewilliams/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
  Collecting setuptools>=40.6.0
    Downloading setuptools-50.3.2-py3-none-any.whl (785 kB)
  Collecting wheel
    Downloading wheel-0.35.1-py2.py3-none-any.whl (33 kB)
  Collecting cffi>=1.0
    Downloading cffi-1.14.3.tar.gz (470 kB)
  Collecting pycparser
    Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
  Building wheels for collected packages: cffi
    Building wheel for cffi (setup.py): started
    Building wheel for cffi (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-9she3k6p/cffi/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-9she3k6p/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/tmp/pip-wheel-6pv7vlky
         cwd: /private/tmp/pip-install-9she3k6p/cffi/
    Complete output (39 lines):
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.14.6-arm64-3.8
    creating build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/backend_ctypes.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/error.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/setuptools_ext.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/__init__.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/cffi_opcode.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/vengine_gen.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/pkgconfig.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/model.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/ffiplatform.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/api.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/vengine_cpy.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/commontypes.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/lock.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/recompiler.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/cparser.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/verifier.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/_cffi_include.h -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/parse_c_type.h -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/_embedding.h -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    copying cffi/_cffi_errors.h -> build/lib.macosx-10.14.6-arm64-3.8/cffi
    running build_ext
    building '_cffi_backend' extension
    creating build/temp.macosx-10.14.6-arm64-3.8
    creating build/temp.macosx-10.14.6-arm64-3.8/c
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-10.14.6-arm64-3.8/c/_cffi_backend.o
    c/_cffi_backend.c:5854:2: error: Apple Arm64 ABI requires ffi_prep_cif_var
    #error Apple Arm64 ABI requires ffi_prep_cif_var
     ^
    c/_cffi_backend.c:6304:9: error: implicit declaration of function 'ffi_prep_closure' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        if (ffi_prep_closure(closure, &cif_descr->cif,
            ^
    2 errors generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
    ERROR: Failed building wheel for cffi
    Running setup.py clean for cffi
  Failed to build cffi
  Installing collected packages: setuptools, wheel, pycparser, cffi
      Running setup.py install for cffi: started
      Running setup.py install for cffi: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-9she3k6p/cffi/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-9she3k6p/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-imoj5bub/install-record.txt --single-version-externally-managed --prefix /private/tmp/pip-build-env-3rzi11hg/overlay --compile --install-headers /private/tmp/pip-build-env-3rzi11hg/overlay/include/python3.8/cffi
           cwd: /private/tmp/pip-install-9she3k6p/cffi/
      Complete output (39 lines):
      running install
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.14.6-arm64-3.8
      creating build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/backend_ctypes.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/error.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/setuptools_ext.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/__init__.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/cffi_opcode.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/vengine_gen.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/pkgconfig.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/model.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/ffiplatform.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/api.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/vengine_cpy.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/commontypes.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/lock.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/recompiler.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/cparser.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/verifier.py -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/_cffi_include.h -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/parse_c_type.h -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/_embedding.h -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      copying cffi/_cffi_errors.h -> build/lib.macosx-10.14.6-arm64-3.8/cffi
      running build_ext
      building '_cffi_backend' extension
      creating build/temp.macosx-10.14.6-arm64-3.8
      creating build/temp.macosx-10.14.6-arm64-3.8/c
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-10.14.6-arm64-3.8/c/_cffi_backend.o
      c/_cffi_backend.c:5854:2: error: Apple Arm64 ABI requires ffi_prep_cif_var
      #error Apple Arm64 ABI requires ffi_prep_cif_var
       ^
      c/_cffi_backend.c:6304:9: error: implicit declaration of function 'ffi_prep_closure' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          if (ffi_prep_closure(closure, &cif_descr->cif,
              ^
      2 errors generated.
      error: command 'clang' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-9she3k6p/cffi/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-9she3k6p/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-imoj5bub/install-record.txt --single-version-externally-managed --prefix /private/tmp/pip-build-env-3rzi11hg/overlay --compile --install-headers /private/tmp/pip-build-env-3rzi11hg/overlay/include/python3.8/cffi Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Python/3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-3rzi11hg/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.0' Check the logs for full command output.

@bollwyvl
Copy link
Contributor

Sorry to edit your stuff, was making my eyes bleed.

Broadly: I'd give open source maintainers a few weekends before expecting stuff to Just Work ™️ on novel chipsets that came out last week! Sure, the m1 is "arm," but it's also "really proprietary."

Next steps: until all the upstreams of notebook have published wheels on pypi for this new stuff to make it easier for you, the Jupyter stack is rather easily installable from conda-forge:

  • get miniforge for your os/platform
    • might not work if downloaded from the browser (see "really proprietary")
    • curl -LO https://github.com/conda-forge/miniforge/releases/download/4.9.0-3/Miniforge3-4.9.0-3-MacOSX-arm64.sh
  • bash Miniforge3-4.9.0-3-MacOSX-arm64.sh, follow the prompts
  • conda install notebook
  • profit!

@joewill01
Copy link
Author

joewill01 commented Nov 19, 2020 via email

@dawsoneliasen
Copy link

@bollwyvl Any update on this? I'd like to avoid using miniforge if possible.

@mushahidmehdi
Copy link

On arch anaconda is not compatible with pacman package manager, check out using yay yet another yogurt package managers.

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

4 participants