openPMD / openPMD-api

:floppy_disk: C++ & Python API for Scientific I/O
https://openpmd-api.readthedocs.io
GNU Lesser General Public License v3.0
142 stars 51 forks source link

Apply patch for #1684: PYBIND11_FINDPYTHON=ON #1695

Closed franzpoeschel closed 1 week ago

franzpoeschel commented 1 week ago

Pre-built wheel installations for 0.16.0 currently may fail importing into a Python environment without this due to wrongly-detected Python paths:

> python
Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import openpmd_api
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/franzpoeschel/git-repos-no-sync/env/lib/python3.10/site-packages/openpmd_api/__init__.py", line 1, in <module>
    from . import openpmd_api_cxx as cxx
ImportError: cannot import name 'openpmd_api_cxx' from partially initialized module 'openpmd_api' (most likely due to a circular import) (/home/franzpoeschel/git-repos-no-sync/env/lib/python3.1
0/site-packages/openpmd_api/__init__.py)