Open immortalzal opened 1 month ago
It appears there's a problem with the installation of gmp on the system... It's not finding the symbol, which, I guess, can be caused by not having the library (the *.so file for gmp) in your library path.
I don't use mac, so I'm sorry I can't be more helpful beyond this!
I had a look on my Mac and updated GMP and pycddlib. I can't reproduce. The only thing I wondered was whether there's some python version conflict causing the gmp library not to be in path... You are using python 3.10 but I think the new Mac OS uses 3.12 by default. Perhaps worth an update?
I've installed Python 3.12 and it still shows the same error.
I really appreciate you guys taking the time to help. Thank you both.
Did you manage to resolve this?
One guess is that you need to update your DYLD_LIBRARY_PATH to point to the folder where the gmp library that was used install pycddlib is located. On github actions this is /opt/homebrew/lib/
, and so you'd do
export DYLD_LIBRARY_PATH=/opt/homebrew/lib/:$DYLD_LIBRARY_PATH
(Note that this isn't actually needed on github actions; either it is already included by default or the build was static... but if I had an ImportError like yours, I'd try to solve it this way.)
If you installed with homebrew, it seems that brew --prefix
will give you the path (without the "/lib/" part, you'll have to add that).
Finally, you can also try
find /usr /opt -name "libgmp.*"
to search your system for where you've installed gmp.
I don't have Mac OS myself so I'm sorry I can't be more helpful beyond trying to give sensible pointers. But I hope at least one of these pointers help.
Somewhat relevant to this issue is that I've created a new package that can be installed without gmp, as some users do not have the ability to install gmp on their system (notably, on Google Colab):
pip install pycddlib-standalone
Note this is still in beta, and the API has changed quite a lot, so it probably won't work for the external program that you are using (until they update to use the new interface), but at least the user experience should be a lot smoother with this.
Hi! I am using a program that includes pycddlib as a package. I use a M1 Macbook Pro. When I tried to run the program, it showed the following message:
I tried to troubleshoot to see what was wrong:
Prior to running the program, I had already installed the newest version of gmp via brew. I also had pycddlib installed.
I encountered no problems while installing pycddlib. I am unsure what is going on here. Any help would be greatly appreciated, and I thank you in advance for your time!