ImportError: dlopen(..., 0x0002): symbol not found in flat namespace _PyCMethod_New #3376
-
Hello, I am having trouble manually building a python package. I developed it without issues using a virtual env and I've followed the wiki about manual building thoroughly (at least i think) and I can
Incidentally the very first line of my I am a bit at a loss on what to do, has anybody have any idea what might be the issue or what I might be doing wrong? Here is some context (if you need anything else let me know):
Machine: M1 mac, Mac Os Ventura 13.1 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This is why it fails when you're importing on a 3.8 interpreter. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot, I wrongly assumed that if building in a folder with a Strangely now, the lib works well when built with |
Beta Was this translation helpful? Give feedback.
-
dlopen(/Users/munzur/miniforge3/lib/python3.9/site-packages/scipy/spatial/_distance_wrap.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_npy_copysign' |
Beta Was this translation helpful? Give feedback.
PyCMethod_New
was added in Python 3.9 so you should check your build environment (you can doPYO3_PRINT_CONFIG=1 cargo build
to get PyO3 to dump what it has detected). PyO3 has presumably detected a 3.9 interpreter (or newer) and is building with that one.This is why it fails when you're importing on a 3.8 interpreter.