LouvainVerificationLab / pynusmv

Python binding for NuSMV.
http://lvl.info.ucl.ac.be/Tools/PyNuSMV
GNU Lesser General Public License v3.0
9 stars 6 forks source link

Unable to install in Python3.8+ #4

Closed sguysc closed 1 year ago

sguysc commented 3 years ago

I cannot install with pip install for a Linux Ubuntu with Python3.8 (also under Anaconda). Works on Python3.6 on the same computer.

  Building wheel for pynusmv (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/user/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3dbg6tft/pynusmv/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3dbg6tft/pynusmv/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-amoiamvx
       cwd: /tmp/pip-install-3dbg6tft/pynusmv/
  Complete output (201 lines):
  ... (~200 lines of what files are created)
  Making dependencies ...
  Compiling: Solver_C.or ( Solver_C.C )
  Solver_C.C:44:8: error: expected unqualified-id before user-defined string literal
   extern "C"void MiniSat_Delete(MiniSat_ptr ms)
          ^~~~~~~
  ../mtl/template.mk:62: recipe for target 'Solver_C.or' failed
  make[3]: *** [Solver_C.or] Error 1
  make[3]: Leaving directory '/tmp/pip-install-3dbg6tft/pynusmv/dependencies/MiniSat/minisat/simp'
  Makefile:28: recipe for target 'simp/libminisat.a' failed
  make[2]: *** [simp/libminisat.a] Error 2
  make[2]: Leaving directory '/tmp/pip-install-3dbg6tft/pynusmv/dependencies/MiniSat/minisat'
  Makefile:41: recipe for target 'minisat.built' failed
  make[1]: *** [minisat.built] Error 2
  make[1]: Leaving directory '/tmp/pip-install-3dbg6tft/pynusmv/dependencies/MiniSat'
  Makefile:37: recipe for target 'minisat.build' failed
  make: *** [minisat.build] Error 2
  make: Leaving directory '/tmp/pip-install-3dbg6tft/pynusmv/dependencies'
  Packing them in a shared library
  Copying the result in lib
  building 'pynusmv_lower_interface.nusmv.addons_core._addons_core' extension
  swigging pynusmv_lower_interface/nusmv/addons_core/addons_core.i to pynusmv_lower_interface/nusmv/addons_core/addons_core_wrap.c
  swig -python -py3 -I./dependencies/NuSMV/NuSMV-2.5.4/nusmv -I./dependencies/NuSMV/NuSMV-2.5.4/nusmv/src -I./dependencies/NuSMV/NuSMV-2.5.4/cudd-2.4.1.1/include -o pynusmv_lower_interface/nusmv/addons_core/addons_core_wrap.c pynusmv_lower_interface/nusmv/addons_core/addons_core.i
  pynusmv_lower_interface/nusmv/addons_core/addons_core.i:15: Error: Unable to find '../../../dependencies/NuSMV/NuSMV-2.5.4/nusmv/src/utils/defs.h'
  pynusmv_lower_interface/nusmv/addons_core/addons_core.i:16: Error: Unable to find '../../../dependencies/NuSMV/NuSMV-2.5.4/nusmv/src/addons_core/addonsCore.h'
  error: command 'swig' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pynusmv
nning setup.py clean for pynusmv
  ERROR: Command errored out with exit status 1:
   command: /home/user/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3dbg6tft/pynusmv/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3dbg6tft/pynusmv/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
       cwd: /tmp/pip-install-3dbg6tft/pynusmv
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: option --all not recognized
  ----------------------------------------
  ERROR: Failed cleaning build dir for pynusmv
Failed to build pynusmv
Installing collected packages: pynusmv
    Running setup.py install for pynusmv ... [?25lerror
    ERROR: Command errored out with exit status 1:
     command: /home/user/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3dbg6tft/pynusmv/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3dbg6tft/pynusmv/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-o29z_oop/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/anaconda3/include/python3.8/pynusmv
         cwd: /tmp/pip-install-3dbg6tft/pynusmv/
    Complete output (36 lines):
    running install
    running build
    running build_py
    running build_ext
    Making the dependencies
    make: Entering directory '/tmp/pip-install-3dbg6tft/pynusmv/dependencies'
    make -C MiniSat
    make[1]: Entering directory '/tmp/pip-install-3dbg6tft/pynusmv/dependencies/MiniSat'
    make -C minisat
    make[2]: Entering directory '/tmp/pip-install-3dbg6tft/pynusmv/dependencies/MiniSat/minisat'
    cd simp && make lib && ranlib libminisat.a
    make[3]: Entering directory '/tmp/pip-install-3dbg6tft/pynusmv/dependencies/MiniSat/minisat/simp'
    Compiling: Solver_C.or ( Solver_C.C )
    Solver_C.C:44:8: error: expected unqualified-id before user-defined string literal
     extern "C"void MiniSat_Delete(MiniSat_ptr ms)
            ^~~~~~~
    ../mtl/template.mk:62: recipe for target 'Solver_C.or' failed
    make[3]: *** [Solver_C.or] Error 1
    make[3]: Leaving directory '/tmp/pip-install-3dbg6tft/pynusmv/dependencies/MiniSat/minisat/simp'
    Makefile:28: recipe for target 'simp/libminisat.a' failed
    make[2]: *** [simp/libminisat.a] Error 2
    make[2]: Leaving directory '/tmp/pip-install-3dbg6tft/pynusmv/dependencies/MiniSat/minisat'
    Makefile:41: recipe for target 'minisat.built' failed
    make[1]: *** [minisat.built] Error 2
    make[1]: Leaving directory '/tmp/pip-install-3dbg6tft/pynusmv/dependencies/MiniSat'
    Makefile:37: recipe for target 'minisat.build' failed
    make: *** [minisat.build] Error 2
    make: Leaving directory '/tmp/pip-install-3dbg6tft/pynusmv/dependencies'
    Packing them in a shared library
    Copying the result in lib
    building 'pynusmv_lower_interface.nusmv.addons_core._addons_core' extension
    swigging pynusmv_lower_interface/nusmv/addons_core/addons_core.i to pynusmv_lower_interface/nusmv/addons_core/addons_core_wrap.c
    swig -python -py3 -I./dependencies/NuSMV/NuSMV-2.5.4/nusmv -I./dependencies/NuSMV/NuSMV-2.5.4/nusmv/src -I./dependencies/NuSMV/NuSMV-2.5.4/cudd-2.4.1.1/include -o pynusmv_lower_interface/nusmv/addons_core/addons_core_wrap.c pynusmv_lower_interface/nusmv/addons_core/addons_core.i
    pynusmv_lower_interface/nusmv/addons_core/addons_core.i:15: Error: Unable to find '../../../dependencies/NuSMV/NuSMV-2.5.4/nusmv/src/utils/defs.h'
    pynusmv_lower_interface/nusmv/addons_core/addons_core.i:16: Error: Unable to find '../../../dependencies/NuSMV/NuSMV-2.5.4/nusmv/src/addons_core/addonsCore.h'
    error: command 'swig' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/user/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3dbg6tft/pynusmv/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3dbg6tft/pynusmv/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-o29z_oop/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/anaconda3/include/python3.8/pynusmv Check the logs for full command output.
bergwerf commented 2 years ago

I have the exact same error. I'm using Python 3.9.2 on Debian 11.

bergwerf commented 2 years ago

This seems to be an issue with the pip build process. Cloning this repository and running python3 setup.py install works for me.

xgillard commented 1 year ago

@sguysc thank you for the report. @bergwerf thank you for the feedback.

I can imagine pip to be complaining about the installation as I think many things have changed In the python ecosystem since last release of pynusmv.

The project is inactive since 2019 but I’d happily hand it over if anyone is interested…