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

Incompatible architecture (have 'arm64', need 'x86_64') #46

Open
mbelveder opened this issue Aug 29, 2023 · 7 comments
Open

Incompatible architecture (have 'arm64', need 'x86_64') #46

mbelveder opened this issue Aug 29, 2023 · 7 comments

Comments

@mbelveder
Copy link

mbelveder commented Aug 29, 2023

  • BXA version: 4.1.1
  • UltraNest version: 3.5.7
  • Python version: 3.8.17
  • Xspec or Sherpa and version: 12.13.0c (Xspec),
  • Operating System: MacOS Ventura 13.5

Description

I tried to install BXA using this guide.

What I Did

During initial tests the following error appeared:

python -c 'import xspec'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/xspec/__init__.py", line 71, in <module>
    from mxspec import callModelFunction
  File "/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/mxspec/__init__.py", line 13, in <module>
    from .mmodel import callModelFunction
  File "/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/mxspec/mmodel.py", line 4, in <module>
    from . import _pymXspec
ImportError: dlopen(/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/mxspec/_pymXspec.so, 0x0002): tried: '/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/_pymXspec.so' (no such file), '/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/mxspec/_pymXspec.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/mxspec/_pymXspec.so' (no such file), '/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/mxspec/_pymXspec.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/lib_pymXspec.dylib' (no such file), '/Users/mike/Soft/heasoft-6.31.1/Xspec/aarch64-apple-darwin22.5.0/lib/python/mxspec/lib_pymXspec.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/mike/Soft/heasoft-6.31.1/Xspec/aarch64-apple-darwin22.5.0/lib/python/mxspec/lib_pymXspec.dylib' (no such file), '/Users/mike/Soft/heasoft-6.31.1/Xspec/aarch64-apple-darwin22.5.0/lib/python/mxspec/lib_pymXspec.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
python -c 'import bxa.xspec as bxa'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/mike/opt/anaconda3/envs/xspecbxa/lib/python3.8/site-packages/bxa/xspec/__init__.py", line 12, in <module>
    from . import qq
  File "/Users/mike/opt/anaconda3/envs/xspecbxa/lib/python3.8/site-packages/bxa/xspec/qq.py", line 11, in <module>
    from xspec import Plot
  File "/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/xspec/__init__.py", line 71, in <module>
    from mxspec import callModelFunction
  File "/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/mxspec/__init__.py", line 13, in <module>
    from .mmodel import callModelFunction
  File "/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/mxspec/mmodel.py", line 4, in <module>
    from . import _pymXspec
ImportError: dlopen(/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/mxspec/_pymXspec.so, 0x0002): tried: '/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/_pymXspec.so' (no such file), '/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/mxspec/_pymXspec.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/mxspec/_pymXspec.so' (no such file), '/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/python/mxspec/_pymXspec.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/mike/Soft/heasoft-6.31.1/aarch64-apple-darwin22.5.0/lib/lib_pymXspec.dylib' (no such file), '/Users/mike/Soft/heasoft-6.31.1/Xspec/aarch64-apple-darwin22.5.0/lib/python/mxspec/lib_pymXspec.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/mike/Soft/heasoft-6.31.1/Xspec/aarch64-apple-darwin22.5.0/lib/python/mxspec/lib_pymXspec.dylib' (no such file), '/Users/mike/Soft/heasoft-6.31.1/Xspec/aarch64-apple-darwin22.5.0/lib/python/mxspec/lib_pymXspec.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

I can run Xspec and PyXspec without any problems.

@JohannesBuchner
Copy link
Owner

JohannesBuchner commented Aug 29, 2023

This is a pyxspec install problem, not a BXA issue.

Please explain what you mean with "can run PyXspec without any problems"?

Probably you have multiple python installs and the one heasoft is compatible with is a different one.

when you use pyxspec, do

import xspec
print(xspec.__file__ )

and also check which python is running.

Try reinstalling heasoft, with the anaconda environment loaded, and pointing heasoft to the conda python path.

@judychang2023
Copy link

Hi Dr. Buchner,
I am encountering a similar issue when trying to install BXA through Conda. The error message is as follows:
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:

  • feature:/osx-arm64::__osx==12.7.2=0
  • feature:/osx-arm64::__unix==0=0
  • feature:|@/osx-arm64::__osx==12.7.2=0
  • feature:|@/osx-arm64::__unix==0=0
  • bxa -> astropy -> __osx[version='>=10.9|>=11.0']
  • bxa -> pymultinest -> __unix

Your installed version is: 0

The xpec version is 12.13.0c.

Could you please advise on how to resolve this issue?
Thank you for your help~
Best Regards,

@JohannesBuchner
Copy link
Owner

Try creating a new clean environment with something like conda create -n myenvname bxa xspec ....

@judychang2023
Copy link

Hi Johannes,
Following the BXA tutorial setup, I created a dedicated BXA conda environment before attempting to install BXA.
However, I encountered the error described previously, where the installation process fails due to conflicts from incompatible packages.

Is there any method to overcome this issue?
Thank you for your feedback~
Best Regards,

@JohannesBuchner
Copy link
Owner

JohannesBuchner commented May 23, 2024

I can now only guess that you did:

conda create -n xspecbxa python=3.8
conda activate xspecbxa
conda install -c conda-forge bxa

You can also install everything at once, which should check for incompatibilities at the start:

conda create -n xspecbxa -c conda-forge python=3.8 bxa

Maybe try different python versions (3.9, 3.10, 3.11) too.

@judychang2023
Copy link

Hi Johannes,
I cleaned the dedicated BXA conda environment, and created a new environment with the python version that already exist on my laptop.
Unfortunately, the same errors still occurred.
Is there any other method to resolve this issue?

Thank you for your assistance.

Best regards,

@JohannesBuchner
Copy link
Owner

I don't know. You have to figure out what is conflicting with what.

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

3 participants