Compiling pmmc

28 views
Skip to first unread message

Marco Nabacino

unread,
Jul 16, 2025, 12:57:50 PMJul 16
to mmc-users
Dear Dr. Fang,

I'm trying to use the brand new pmmc release, but after installing pmmc via PyPi, when I try to import it I get the following error:
import pmmc
the pmmc binary extension (_pmmc) is not compiled! please compile first

I thought it would work out of the box like pyiso2mesh, which I'm having no problems with, but apparently that's not the case. On the Github page I could only find build instructions which have the user clone the repo and go from there, which defeats the purpose of installing via pip.

Is there anything I'm missing?
Thank you very much,
Marco Nabacino

Qianqian Fang

unread,
Jul 16, 2025, 3:07:10 PMJul 16
to mmc-...@googlegroups.com, Marco Nabacino

hi Marco,

can you let me know what version and operating system you are trying to install pmmc?

the github action script for building the pypi packages supports most versions of python on Linux, Mac, and Windows. however, for Python 3.13 on windows, we had observed an error, as a result, the binary wheel compilation for windows on Python 3.13 have been disabled

https://github.com/fangq/mmc/commit/24dab0b5914997925de5d9fc0c9cc07ff3574cfb

the error when building pmmc on this combination can be found here

https://github.com/fangq/mmc/actions/runs/15881626353/job/44783228936

I am not sure you can see the full log, but it appears to me that it is caused by imcompatibility between pybind11, the library that we use to "bind" mmc with python is currently not compatible with python 3.13. we haven't had chance to trouble shoot this or reporting this as a bug to the upstream.

are you using this combination? a workaround is to install a different Python version and installing pmmc again.

let me know if you can provide additional information.

Qianqian


On 7/16/25 12:57, Marco Nabacino wrote:

You don't often get email from marco....@gmail.com. Learn why this is important

--
You received this message because you are subscribed to the Google Groups "mmc-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mmc-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mmc-users/6e1b2b8c-9673-4915-a31e-4149847d6708n%40googlegroups.com.

Qianqian Fang

unread,
Jul 17, 2025, 12:30:39 AMJul 17
to mmc-...@googlegroups.com, Marco Nabacino

hi Marco, if you indeed saw this issue on windows with Python 3.13, I just want to let you know I was able to fix it, now github builds and updates

https://github.com/fangq/mmc/actions/runs/16336052011

like I said, this appears to be a pybind11-python3.13-windows-only compatibility issue. pmmc should now supports for python 3.6-3.13 on all 3 OSes, try installing it via pip again

Marco Nabacino

unread,
Jul 17, 2025, 6:15:53 AMJul 17
to mmc-users
Hi Dr. Fang,

thank you for your quick response. I'm actually using Python 3.12 on Windows, but I also tried Python versions 3.10-3.13 with the new fix and none of the those worked, I'm still getting the same message on import.
Please let me know if you need more information.
Thank you,
Marco

Qianqian Fang

unread,
Jul 19, 2025, 1:35:40 AMJul 19
to mmc-...@googlegroups.com, Marco Nabacino

hi Marco,

you were correct. "import pmmc" on windows reports an error for me as well.

this issue is now fixed by the 0.2.4 version uploaded to pypi just a moment ago - please reinstall pmmc to use the newer version.

what happened was that pmmc on windows was compiled using gcc with mingw64, and requires a few DLL files, including libgomp-1.dll, libwinpthread-1.dll etc. If your windows does not have mingw64 configured, import _pmmc failed to find these DLL files, and throw an error.


in 0.2.4, I added temporary solution: you must install another python module sparse_numba first (pip install sparse_numba), which provides these DLL files. Once you have both sparse_numba and pmmc installed, import pmmc would work. See my attached screenshot


this is not the best solution, but it seems to work ok - in the future, if I have time, I will modify my binary wheel configuration to include these dlls within pmmc.

give it a try.


Qianqian

pmmc_windows_024.png

Marco Nabacino

unread,
Jul 21, 2025, 4:22:27 AMJul 21
to mmc-users
Hi Dr. Fang,

I tried again following your instructions and now it works properly. Thank you for the support!
Best,
Marco

Reply all
Reply to author
Forward
0 new messages