Open mrossinek opened 5 months ago
bump?
This bug is commonly encountered when using symengine on Fedora-based systems (including RHEL), under virtualenv or tox (which uses virtualenv under the hood, I have heard). The below Dockerfile shows how simple it is to reproduce, and it makes symengine impossible to uses under these circumstances.
FROM fedora:40
RUN dnf install -y pip
RUN pip install virtualenv
RUN virtualenv myenv
RUN ./myenv/bin/pip install symengine
RUN ./myenv/bin/python -c 'import symengine'
This test case can be reproduced by installing docker, placing the above text in a Dockerfile
in its own directory, and running docker build .
from that directory.
STEP 6/6: RUN ./myenv/bin/python -c 'import symengine'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "//myenv/lib/python3.12/site-packages/symengine/__init__.py", line 12, in <module>
import symengine.lib.symengine_wrapper as wrapper
ModuleNotFoundError: No module named 'symengine.lib.symengine_wrapper'
Error: building at STEP "RUN ./myenv/bin/python -c 'import symengine'": while running runtime: exit status 1
Switching to scikit-build would be the best way forward
I would like to raise the issue https://github.com/symengine/symengine.py/issues/474 to this repo because I believe that the fix for this requires some changes to how the Python wheels are built.
There is a lot in that discussion so let me try to summarize the key points:
symengine
some problems occur with symengine wheels on specific platforms and environment setups (see https://github.com/symengine/symengine.py/issues/474#issuecomment-1980406944)lib
andlib64
are symlinked and whether the wheel reports to be pure Python or not (see https://github.com/symengine/symengine.py/issues/474#issuecomment-1980471084 and following comments).The
symengine
wheels report as pure Python, although they are not, which I believe has to be fixed for this issue to be resolved. Unfortunately, I do not have the expertise to fix this in the build system ofsymengine
but maybe the maintainers of this repository could help with that.I see that there have been efforts in the past to part the build setup to
scikit-build
, which might prove to be a good path forward:Cc @martinruefenacht