mcmtroffaes / pycddlib

A Python wrapper for Komei Fukuda's cddlib.
http://packages.python.org/pycddlib/
GNU General Public License v2.0
61 stars 9 forks source link

pip install pycddlib fails #74

Closed whiterabbitfollow closed 1 month ago

whiterabbitfollow commented 1 month ago

Hey,

Tried to install the library by pip, but it fails and gives the output below. Im on Ubuntu 22.04.4 LTS and running python 3.11.4. Let me know if you need more info.

python -m pip install pycddlib

Collecting pycddlib Using cached pycddlib-3.0.0.tar.gz (31 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: pycddlib Building wheel for pycddlib (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for pycddlib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [29 lines of output] running bdist_wheel running build running build_py running egg_info writing src/pycddlib.egg-info/PKG-INFO writing dependency_links to src/pycddlib.egg-info/dependency_links.txt writing requirements to src/pycddlib.egg-info/requires.txt writing top-level names to src/pycddlib.egg-info/top_level.txt reading manifest file 'src/pycddlib.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' no previously-included directories found matching 'test' adding license file 'LICENSE.md' adding license file 'AUTHORS' writing manifest file 'src/pycddlib.egg-info/SOURCES.txt' creating build/lib.linux-x86_64-cpython-310/cdd copying src/cdd/init.pyi -> build/lib.linux-x86_64-cpython-310/cdd copying src/cdd/gmp.pyi -> build/lib.linux-x86_64-cpython-310/cdd copying src/cdd/py.typed -> build/lib.linux-x86_64-cpython-310/cdd running build_ext Compiling cython/_cdd.pyx because it changed. [1/1] Cythonizing cython/_cdd.pyx building 'cdd.init' extension creating build/temp.linux-x86_64-cpython-310/cython x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/berwul/.virtualenvs/mpc/include -I/usr/include/python3.10 -c cython/_cdd.c -o build/temp.linux-x86_64-cpython-310/cython/_cdd.o cython/_cdd.c:1248:10: fatal error: cddlib/setoper.h: No such file or directory 1248 | #include "cddlib/setoper.h" | ^~~~~~ compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pycddlib Failed to build pycddlib ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pycddlib)

whiterabbitfollow commented 1 month ago

Seems to work after running:

sudo apt-get install libcdd-dev libgmp-dev python3-dev

Thought it would work by just running pip install... anyways, closing this issue.

mcmtroffaes commented 1 month ago

Yes, this is documented at https://pycddlib.readthedocs.io/en/latest/quickstart.html#installation - Thanks for taking the time to report. I'm glad you managed to solve it on your own!