abess-team / skscope

skscope: Sparse-Constrained OPtimization via itErative-solvers
https://skscope.readthedocs.io
MIT License
318 stars 13 forks source link

[Error] an incompatible architecture (have 'x86_64', need 'arm64') #1

Closed Mamba413 closed 1 year ago

Mamba413 commented 1 year ago

It raises the following error when I import this library.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/zhujin/abess-team/scope/scope/__init__.py", line 16, in <module>
    from .universal import (ConvexSparseSolver)
  File "/Users/zhujin/abess-team/scope/scope/universal.py", line 4, in <module>
    from .pybind_cabess import pywrap_Universal, UniversalModel, init_spdlog
ImportError: dlopen(/Users/zhujin/abess-team/scope/scope/pybind_cabess.cpython-39-darwin.so, 0x0002): tried: '/Users/zhujin/abess-team/scope/scope/pybind_cabess.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/zhujin/abess-team/scope/scope/pybind_cabess.cpython-39-darwin.so' (no such file), '/Users/zhujin/abess-team/scope/scope/pybind_cabess.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
Mamba413 commented 1 year ago

I fixed this problem by using the python in miniconda rather the python in miniforge.

Mamba413 commented 1 year ago

There are some possible solutions in stackflow like https://stackoverflow.com/questions/72308682/mach-o-file-but-is-an-incompatible-architecture-have-x86-64-need-arm64e and https://stackoverflow.com/questions/70723757/arch-x86-64-and-arm64e-is-available-but-python3-is-saying-incompatible-architect