Difficulties installing CAD_to_OpenMC with Python3.12
victordgehm opened this issue · 12 comments
Inside a conda environment running python3.12 and installing from pip:
pip install CAD_to_OpenMC
I get the following error:
File "/home/nuclear/anaconda3/envs/openmc-env/lib/python3.12/site-packages/setuptools/dist.py", line 963, in run_command
super().run_command(command)
File "/home/nuclear/anaconda3/envs/openmc-env/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-install-nl43z7pg/nlopt_373ac090b3584b99a65e173f5a2539ec/setup.py", line 28, in run
self.build_extension(ext)
File "/tmp/pip-install-nl43z7pg/nlopt_373ac090b3584b99a65e173f5a2539ec/setup.py", line 70, in build_extension
nlopt_py = next(Path(self.build_temp).rglob("nlopt.py"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for nlopt
Running setup.py clean for nlopt
Failed to build nlopt
ERROR: Could not build wheels for nlopt, which is required to install pyproject.toml-based projects
I tried to compile nlopt on its own, but the error persist.
Erik Bergbäck Knudsen suggested to create the conda environment with python3.9 and retry. It did work. However it should be investigated why the nopt library won't install with the newer version of python
@victordgehm I am investigating this - but I am having a little trouble reproducing the problem. Which platform are you on? I've tried setting up a python 3.12 environment and things seems to work fine there at least. Next to try is to reproduce your platform in a VM I think.
I'd think so too - but now I know what I should try to reproduce. Thank you!
This bug is confirmed on ubuntu 22.04 with python 3.12.
For now it seems required to stay at python < 3.11
I will report the nlopt-problem upstream to get it fixed.
The nlopt people are working on it (the python 3.12 issue), and should be very close to completion. I was able to monkeypatch a few files and get it to install on ubuntu+python3.12.
It appears that the above problem has been fixed - now 3.12 complains with a different issue:"ImportError: cannot import name 'zoom' from 'ezdxf' "
which is imported by the chain cadquery -> .occ_impl.exporters -> .dxf.exportDXF,DxfDocument
waiting for an upstream fix to this