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

poetry install arm64 architecture err #524

Closed
joeflack4 opened this issue Apr 27, 2024 · 4 comments
Closed

poetry install arm64 architecture err #524

joeflack4 opened this issue Apr 27, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@joeflack4
Copy link
Collaborator

joeflack4 commented Apr 27, 2024

Overview

I'm using Apple Silicon (arm64), and I'm trying to create a fresh environment but getting an error.

To replicate

  1. Have an arm64 based machine
  2. virtualenv env
  3. source env/bin/activate
  4. poetry install
  5. Observe error

The error

incompatible architecture (have 'x86_64', need 'arm64')

Log

poetry install
Installing dependencies from lock file

Package operations: 54 installs, 8 updates, 0 removals

  • Installing attrs (23.2.0)
  • Installing exceptiongroup (1.2.0)
  • Installing iniconfig (2.0.0)
  • Updating packaging (21.3 -> 23.2)
  • Updating pluggy (1.0.0 -> 1.3.0)
  • Installing rpds-py (0.16.2)
  • Installing tomli (2.0.1)
  • Installing typing-extensions (4.9.0)
  • Installing annotated-types (0.6.0)
  • Installing certifi (2023.11.17)
  • Installing charset-normalizer (3.3.2)
  • Installing idna (3.6)
  • Installing pydantic-core (2.14.6)
  • Installing pytest (7.4.4)
  • Installing referencing (0.32.1)
  • Installing sortedcontainers (2.4.0)
  • Installing urllib3 (2.1.0)
  • Installing zipp (3.17.0)
  • Installing click (8.1.7)
  • Installing greenlet (2.0.1): Failed

  ImportError

  dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/_cffi_backend.cpython-310-darwin.so, 0x0002): tried: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/_cffi_backend.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/_cffi_backend.cpython-310-darwin.so' (no such file), '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/_cffi_backend.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

  at ~/Library/Python/3.10/lib/python/site-packages/xattr/lib.py:7 in <module>
        3│
        4│ from .compat import fs_encode
        5│
        6│ try:
    →   7│     from ._lib import lib, ffi
        8│ except ImportError:
        9│     from .lib_build import ffi, c_source
       10│     lib = ffi.verify(c_source)
       11│

The following error occurred when trying to handle this error:


  FileNotFoundError

  [Errno 2] No such file or directory: '/Users/joeflack4/Library/Python/3.10/lib/python/site-packages/xattr/lib_build.h'

  at ~/Library/Python/3.10/lib/python/site-packages/xattr/lib_build.py:7 in <module>
        3│ from cffi import FFI
        4│
        5│ PATH = os.path.dirname(__file__)
        6│
    →   7│ with open(os.path.join(PATH, 'lib_build.h')) as hf:
        8│     c_header = hf.read()
        9│ with open(os.path.join(PATH, 'lib_build.c')) as cf:
       10│     c_source = cf.read()
       11│

Cannot install greenlet.

  • Installing hbreader (0.9.1)
  • Installing importlib-metadata (7.0.1)
  • Installing isodate (0.6.1)
  • Installing jsonschema-specifications (2023.12.1)
  • Installing pydantic (2.5.3)
  • Updating pyparsing (3.0.9 -> 3.1.1)
  • Installing pytest-logging (2015.11.4)
  • Installing pytrie (0.4.0)
  • Installing pyyaml (6.0.1)
  • Installing requests (2.31.0)
  • Installing wrapt (1.16.0)

Possible solutions

Somehow, I think pyproject.toml and/or poetry.lock has to have some change to accommodate multiple architectures.

What I tried

I think I hacked around this issue temporarily by:

  1. Deleting poetry.lock
  2. poetry install
  3. Restoring the original poetry.lock (not committing the new one created)
@joeflack4 joeflack4 added the bug Something isn't working label Apr 27, 2024
@matentzn
Copy link
Collaborator

Let's hope this is temporary - I have so far not ever had that problem, maybe this is a temporarily broken dependencies

@cmungall
Copy link
Collaborator

cmungall commented Apr 29, 2024 via email

@matentzn
Copy link
Collaborator

Try again @joeflack4, made a new release

@joeflack4
Copy link
Collaborator Author

@chris yeah I figured it was either removed or just that that version was never released for arm64. I see you encountered a similar / same issue.

@matentzn I tried poetry install w/ your new update on master and it worked! Thanks!

Gonna close this now, but this is also a good time to bring up a similar issue I'm experiencing: sssom is not a package. I brought it up on slack first, but perhaps it should also be a GH issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants