Skip to content

Python 3.11 cannot install cvxopt #39

@francoislaurent

Description

@francoislaurent

The cvxopt package has not been updated and binaries are not available for Python 3.11 yet:

Installing collected packages: pytz, tqdm, six, pyparsing, pillow, numpy, networkx, kiwisolver, fonttools, cycler, cvxopt, scipy, python-dateutil, h5py, contourpy, polytope, pandas, matplotlib, rwa-python, tramway
  DEPRECATION: cvxopt is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for cvxopt: started
  Running setup.py install for cvxopt: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Running setup.py install for cvxopt did not run successfully.
  │ exit code: 1
  ╰─> [49 lines of output]
      running install
      /opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/cvxopt
      copying src/python/coneprog.py -> build/lib.linux-x86_64-cpython-311/cvxopt
      copying src/python/msk.py -> build/lib.linux-x86_64-cpython-311/cvxopt
      copying src/python/__init__.py -> build/lib.linux-x86_64-cpython-311/cvxopt
      copying src/python/modeling.py -> build/lib.linux-x86_64-cpython-311/cvxopt
      copying src/python/_version.py -> build/lib.linux-x86_64-cpython-311/cvxopt
      copying src/python/cvxprog.py -> build/lib.linux-x86_64-cpython-311/cvxopt
      copying src/python/solvers.py -> build/lib.linux-x86_64-cpython-311/cvxopt
      copying src/python/info.py -> build/lib.linux-x86_64-cpython-311/cvxopt
      copying src/python/misc.py -> build/lib.linux-x86_64-cpython-311/cvxopt
      copying src/python/printing.py -> build/lib.linux-x86_64-cpython-311/cvxopt
      UPDATING build/lib.linux-x86_64-cpython-311/cvxopt/_version.py
      set build/lib.linux-x86_64-cpython-311/cvxopt/_version.py to '1.3.0'
      running build_ext
      building 'base' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      creating build/temp.linux-x86_64-cpython-311/src/C
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/opt/hostedtoolcache/Python/3.11.2/x64/include/python3.11 -c src/C/base.c -o build/temp.linux-x86_64-cpython-311/src/C/base.o
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/opt/hostedtoolcache/Python/3.11.2/x64/include/python3.11 -c src/C/dense.c -o build/temp.linux-x86_64-cpython-311/src/C/dense.o
      src/C/dense.c: In function ‘Matrix_NewFromPyBuffer’:
      src/C/dense.c:277:28: warning: ‘n.d’ may be used uninitialized [-Wmaybe-uninitialized]
        277 |        MAT_BUFD(a)[cnt] = n.d;
            |                           ~^~
      src/C/dense.c:255:13: note: ‘n’ declared here
        255 |      number n;
            |             ^
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/opt/hostedtoolcache/Python/3.11.2/x64/include/python3.11 -c src/C/sparse.c -o build/temp.linux-x86_64-cpython-311/src/C/sparse.o
      gcc -shared -Wl,--rpath=/opt/hostedtoolcache/Python/3.11.2/x64/lib -Wl,--rpath=/opt/hostedtoolcache/Python/3.11.2/x64/lib build/temp.linux-x86_64-cpython-311/src/C/base.o build/temp.linux-x86_64-cpython-311/src/C/dense.o build/temp.linux-x86_64-cpython-311/src/C/sparse.o -L/usr/lib -L/opt/hostedtoolcache/Python/3.11.2/x64/lib -lm -llapack -lblas -o build/lib.linux-x86_64-cpython-311/cvxopt/base.cpython-311-x86_64-linux-gnu.so
      building 'blas' extension
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/opt/hostedtoolcache/Python/3.11.2/x64/include/python3.11 -c src/C/blas.c -o build/temp.linux-x86_64-cpython-311/src/C/blas.o
      gcc -shared -Wl,--rpath=/opt/hostedtoolcache/Python/3.11.2/x64/lib -Wl,--rpath=/opt/hostedtoolcache/Python/3.11.2/x64/lib build/temp.linux-x86_64-cpython-311/src/C/blas.o -L/usr/lib -L/opt/hostedtoolcache/Python/3.11.2/x64/lib -lblas -o build/lib.linux-x86_64-cpython-311/cvxopt/blas.cpython-311-x86_64-linux-gnu.so
      building 'lapack' extension
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/opt/hostedtoolcache/Python/3.11.2/x64/include/python3.11 -c src/C/lapack.c -o build/temp.linux-x86_64-cpython-311/src/C/lapack.o
      gcc -shared -Wl,--rpath=/opt/hostedtoolcache/Python/3.11.2/x64/lib -Wl,--rpath=/opt/hostedtoolcache/Python/3.11.2/x64/lib build/temp.linux-x86_64-cpython-311/src/C/lapack.o -L/usr/lib -L/opt/hostedtoolcache/Python/3.11.2/x64/lib -llapack -lblas -o build/lib.linux-x86_64-cpython-311/cvxopt/lapack.cpython-311-x86_64-linux-gnu.so
      building 'umfpack' extension
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include -I/opt/hostedtoolcache/Python/3.11.2/x64/include/python3.11 -c src/C/umfpack.c -o build/temp.linux-x86_64-cpython-311/src/C/umfpack.o
      src/C/umfpack.c:23:10: fatal error: umfpack.h: No such file or directory
         23 | #include "umfpack.h"
            |          ^~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/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: legacy-install-failure

× Encountered error while trying to install package.
╰─> cvxopt

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Maybe we should temporarily remove the cvxopt dependency. It is optional after all..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions