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

Python Bindings fails on Mac M2 #241

Open
pkeshava opened this issue Oct 22, 2024 · 3 comments
Open

Python Bindings fails on Mac M2 #241

pkeshava opened this issue Oct 22, 2024 · 3 comments

Comments

@pkeshava
Copy link

I've successfully used brew to install openems and have verified that AppCSXCAD runs. However, I cannot get the python bindings to install. I've tried many things including the recommended steps in the documentation along with the discussion in #190 with no luck. The main issue is that the linker cannot find the CSXCAD lib, i.e., regardless of whatever method I try, I eventually get the error:

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

after I've run

/opt/homebrew/opt/[email protected]/bin/pip3 install python/. --break-system-packages --user

I suppose I have to use LDFLAGS=...? but I'm not sure of the path to the lib??
This error occurs regardless of whether I use a virtual env python or the system wide as shown above

@SengerM
Copy link
Contributor

SengerM commented Nov 3, 2024

May want to try #239 ? I was having several issues installing the Python modules on Linux, with that now it works like a charm.

@pkeshava
Copy link
Author

pkeshava commented Nov 3, 2024

May want to try #239 ? I was having several issues installing the Python modules on Linux, with that now it works like a charm.

That seems to have done the trick. Thank you!!

@aWZHY0yQH81uOYvH
Copy link
Contributor

aWZHY0yQH81uOYvH commented Nov 3, 2024

Did Homebrew successfully install the python packages to its managed version of python? You shouldn't have to install it separately.

Try running /opt/homebrew/bin/python3 and see if import openEMS works. To make a python environment you can install further packages into, I would create a venv from that version of python with the --system-site-packages option. This way, everything gets upgraded at the same time when you upgrade via Homebrew.

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