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

Unable to install python-casacore #262

Open
GhidoniR opened this issue Mar 25, 2024 · 3 comments
Open

Unable to install python-casacore #262

GhidoniR opened this issue Mar 25, 2024 · 3 comments

Comments

@GhidoniR
Copy link

I have a MacBook Air with chip Apple M1 and MacOS Ventura 13.4. I also have the python version 3.11.5.

When I try to install python-casacore with pip I get the error

fatal error: 'boost/python.hpp' file not found
      #include <boost/python.hpp>
               ^~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1

If I try to install from the source repository I get:

fatal error: 'casacore/python/Converters/PycBasicData.h' file not found
#include <casacore/python/Converters/PycBasicData.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1

How can I solve this?

@gmloose
Copy link
Collaborator

gmloose commented Mar 26, 2024

We are currently not able to create binary wheels for MacOS Mx processors, unfortunately. You therefore need to build python-casacore from source. For that you need to install at least the following:

  • Boost.Python, including development files (header files)
  • Casacore, including development files (header files)

I'm not an Apple expert, but if I recall correctly people have successfully built python-casacore using Brew. Hope this helps.

@GhidoniR
Copy link
Author

GhidoniR commented Apr 1, 2024

Thank you so much. I have installed both boost and casacore but now I get this error:

clang++ -bundle -undefined dynamic_lookup -Wl,-rpath,/Users/ghidoni/anaconda3/lib -L/Users/ghidoni/anaconda3/lib -Wl,-rpath,/Users/ghidoni/anaconda3/lib -L/Users/ghidoni/anaconda3/lib -std=c++11 build/temp.macosx-11.1-arm64-cpython-311/src/fit.o build/temp.macosx-11.1-arm64-cpython-311/src/fitting.o -L/usr/local/lib -L/opt/homebrew/lib -lcasa_scimath -lcasa_scimath_f -lboost_python311 -lcasa_python3 -o build/lib.macosx-11.1-arm64-cpython-311/casacore/fitting/_fitting.cpython-311-darwin.so

ld: library not found for -lcasa_python3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang++' failed with exit code 1

Any idea what cause this? I am installing from the repository, not directly with pip or brew

@gmloose
Copy link
Collaborator

gmloose commented Apr 2, 2024

Maybe you should use brew. Like I said, I'm not an Apple expert. The error message means that the linker cannot find the casa_python3 library. It probably means that brew puts this in a directory that is not search by the linker by default. You could try to add -L<path/to/casa_python3-library> to the link command, where you need to fill in the correct path of course.

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