0
LINK : fatal error LNK1181: cannot open input file 'lapack.lib'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\link.exe' failed with exit code 1181

I'm getting this error while installing cvxopt. I've set the directory for lapack lib in the setup.py file inside the cvxopt folder. However running the command

python setup.py install

generates this error. Can anyone help me with this?

Mansi
  • 11
  • 3

1 Answers1

0

If you use pip install cvxopt it will use a pre-built binary wheel package already.

If you want to build from source (as you are currently doing) then you need to have BLAS and LAPACK installed on your system
https://cvxopt.org/install/#building-and-installing-from-source

Required and optional software

The package requires version 3.x of Python, and building from source requires core binaries and header files and libraries for Python.

The installation requires BLAS and LAPACK. Using an architecture optimized implementation such as ATLAS, OpenBLAS, or MKL is recommended and gives a large performance improvement over reference implementations of the BLAS and LAPACK libraries.

The installation also requires SuiteSparse. We recommend linking against a shared SuiteSparse library. It is also possible to build the required components of SuiteSparse when building CVXOPT, but this requires the SuiteSparse source which is no longer included with CVXOPT and must be downloaded separately.

The following software libraries are optional.

  • The GNU Scientific Library GSL.
  • FFTW is a C library for discrete Fourier transforms.
  • GLPK is a linear programming package.
  • MOSEK version 9 is a commercial library of convex optimization solvers.
  • DSDP5.8 is a semidefinite programming solver.
Cory Kramer
  • 114,268
  • 16
  • 167
  • 218
  • I've already installed BLAS and LAPACK in my system and copied libblas.a and liblapack.a to the src directory. Earlier it wasn't able to find blas.lib also but after I updated the path in setup.py file in the src directory of the cvxopt folder, that error is no longer generated. But the error LINK : fatal error LNK1181: cannot open input file 'lapack.lib' is still coming. – Mansi Dec 13 '22 at 07:18