scipopt / PySCIPOpt

Python interface for the SCIP Optimization Suite
https://pyscipopt.readthedocs.io/en/latest/
MIT License
825 stars 255 forks source link

Install using pip started failing #921

Closed jeff-kline-affirm closed 2 weeks ago

jeff-kline-affirm commented 1 month ago

Describe the bug Installing with "pip install PySCIPOpt" begain failing on Nov 1 2024, the pip install command now tries to install from source, e.g., "Using cached pyscipopt-5.2.1.tar.gz". Preferentially, when pip install is run, the command does not attempt to compile source, which was the prior behavior. An example of what the above command ran prior to Nov 1 was "Downloading PySCIPOpt-5.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"

The compile error we see now is:

× Building wheel for PySCIPOpt (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [48 lines of output]
      Assuming that SCIP is installed globally, because SCIPOPTDIR is undefined.

      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.8
      creating build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/Multidict.py -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/_version.py -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/__init__.py -> build/lib.linux-x86_64-3.8/pyscipopt
      creating build/lib.linux-x86_64-3.8/pyscipopt/recipes
      copying src/pyscipopt/recipes/infeasibilities.py -> build/lib.linux-x86_64-3.8/pyscipopt/recipes
      copying src/pyscipopt/recipes/nonlinear.py -> build/lib.linux-x86_64-3.8/pyscipopt/recipes
      copying src/pyscipopt/recipes/piecewise.py -> build/lib.linux-x86_64-3.8/pyscipopt/recipes
      copying src/pyscipopt/recipes/__init__.py -> build/lib.linux-x86_64-3.8/pyscipopt/recipes
      running egg_info
      writing manifest file 'PySCIPOpt.egg-info/SOURCES.txt'
      copying src/pyscipopt/benders.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/benderscut.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/branchrule.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/conshdlr.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/cutsel.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/event.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/expr.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/heuristic.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/lp.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/nodesel.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/presol.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/pricer.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/propagator.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/reader.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/relax.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/scip.c -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/scip.pxd -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/scip.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/scip.pyx -> build/lib.linux-x86_64-3.8/pyscipopt
      copying src/pyscipopt/sepa.pxi -> build/lib.linux-x86_64-3.8/pyscipopt
      running build_ext
      creating build/temp.linux-x86_64-3.8
      creating build/temp.linux-x86_64-3.8/src
      creating build/temp.linux-x86_64-3.8/src/pyscipopt
      x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I. -I/local_disk0/.ephemeral_nfs/envs/pythonEnv-7a5afb77-8f27-496b-9901-446c6941a8a5/include/python3.8 -c src/pyscipopt/scip.c -o build/temp.linux-x86_64-3.8/src/pyscipopt/scip.o
      src/pyscipopt/scip.c:1274:10: fatal error: scip/type_retcode.h: No such file or directory
       #include "scip/type_retcode.h"
                ^~~~~~~~~~~~~~~~~~~~~

To Reproduce

"pip install PySCIPOpt"

Expected behavior

We expect to install precompiled binary

Screenshots If applicable, add screenshots to help explain your problem.

System

Additional context Add any other context about the problem here.

Joao-Dionisio commented 1 month ago

Hey @jeff-kline-affirm, thanks for bringing this up, and sorry for the problem. Unfortunately, it came at the wrong time as we're entering the weekend, but it will be a top priority next week. In the meantime, if it's not too much of a bother, you can install the previous version of pyscipopt with pip install pyscipopt==5.1.1

You may already know this, but it can be useful for other as well.

Opt-Mucca commented 1 month ago

@jeff-kline-affirm What exact OS are you using? If it is Ubuntu 22.04 then we have a problem.... To maybe quickly diagnose the issue: Can you check the where your Linux based OS fits on the overview https://github.com/pypa/manylinux of the README of this page. We stopped building on CentOS 7 because it reached its EOL for support. While we wanted to keep it, GitHub runners seem to have immediately dropped any support for them and our build process is tied pretty heavily to them. We therefore now build the manylinux_2_28 instead of manylinux2014. If your OS is included in the latter but not the former, then we apologise for that. If there are enough effected users then we'll look into it, otherwise we encourage installing via source and using the precompiled SCIP distributions.

jeff-kline-affirm commented 3 weeks ago

We're using "Ubuntu 18.04.5 LTS". Pinning pyscipopt to prior version is working for now.

Opt-Mucca commented 2 weeks ago

It seems that Ubuntu 18.04 by default comes with glibc == 2.27. This is therefore no longer supported in the most recent PySCIPOpt release on PyPI, which requires glibc >= 2.28.

We will look into putting more work and rolling back the requirement to glibc >= 2.17, although I make no promises unless this is a very wide spread issue. Ultimately you are running an OS that is no longer under support, and I foresee a lot of hurdles on our end if we try.