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

ERROR: Failed building wheel for pycddlib #59

Closed asnota closed 2 years ago

asnota commented 2 years ago

Hello, I'm trying to install LNN package in Jupiter notebooks with python 3.9.1 version installed. After running this line of code: !pip install git+https://github.com/IBM/LNN.git in the end of the log I get the error with installation of pycddlib:


  Building wheel for lnn (setup.py) ... done
  Created wheel for lnn: filename=lnn-1.1-py3-none-any.whl size=89906 sha256=016f7dd6727b90088b2178992414a06cb9d7272f6b8b6596b5e8eb30bb9ec89f
  Stored in directory: /tmp/pip-ephem-wheel-cache-dqii84eb/wheels/27/9d/f6/70a6c9e8d6f1349d99b6c4c6254022653ee0d1958222332fe4
  Building wheel for pycddlib (setup.py) ... error
  ERROR: Failed building wheel for pycddlib
  Running setup.py clean for pycddlib
Successfully built lnn
Failed to build pycddlib
Installing collected packages: pycddlib, networkx, matplotlib, lnn
    Running setup.py install for pycddlib ... error
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jhm9btrx/pycddlib_1e0612e538de4986a8fcccdce25abb4e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jhm9btrx/pycddlib_1e0612e538de4986a8fcccdce25abb4e/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-xdi_ua02/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/pycddlib Check the logs for full command output.```
mcmtroffaes commented 2 years ago

This sounds related to #57. Did you try sudo apt-get install python3.9-dev (or something similar)? If that doesn't do the trick, having the full log would be helpful.

asnota commented 2 years ago

The problem was in missing gmp.h file: fatal error: gmp.h: No such file or directory I therefore run sudo apt-get install libgmp3-dev following the related thread and it solved the issue.

mcmtroffaes commented 2 years ago

Yes, this is also mentioned in the pycddlib documentation (see https://pycddlib.readthedocs.io/en/latest/quickstart.html), so I don't think there's anything else I can do to avoid users running into this problem. I'm glad you got it sorted.