Noisy for several days, finally will cvxopt installation success, here and you share the installation process:
- Download and install Python from www.python.org. Next, use the Python 2.7.5 (32bit) version (note: The 64-bit Win 7 system can also be installed directly).
- Download and install the MinGW compiler (www.mingw.org)
- Download and run MinGW installer
- Select Install C editor (C compiler), FORTRAN compiler (Fortran compiler), and Msys Basic System
- Open the environment variable, set the environment variable, the variable name is path, the variable value is c:\python27;c:\mingw\bin;c:\mingw\msys\1.0\bin. As shown
-
- Download and compile Blas
- Download blas.tgz, unzip to Blas folder
- Go to the command line and cut into the Blas folder
- Enter command line
- Attention:.. /indicates the top-level directory of the current directory
- Download and compile Lapack
- Download lapack.tgz and unzip to Lapack
- Go to the command line and cut into the Lapack folder
- Enter the command line as follows:
- CP Make.inc.example Make.inc
- Make Lapacklib && CP liblapack.a.
- Attention:.. Represents the top-level directory of the current directory
- Download and install Cvxopt
- Download cvxopt and unzip to cvxopt-1.1.7
- Copy the 3rd, 4-Step generated LIBBLAS.A and liblapack.a to the directory cvxopt-1.1.7/src
- Edit cvxopt-1.1.7/under setup.py file, set environment variables Blas_lib and Blas_lib_dir:
- Blas_lib = [' BLAS ', ' Gfortran ']
- Blas_lib_dir = '. '
- Use the following command to remove '-mno-cygwin ' from the \python27\lib\distutils\cygwinccompiler.py,
- Sed ' s/-mno-cygwin//g '-i ' bak ' c:\Python27\Lib\distutils\cygwinccompiler.py
- Note: This command needs to run as an administrator, as an administrator, see http://jingyan.baidu.com/article/0320e2c181dc461b87507b37.html
- Run the following command under the cvxopt-1.1.7 folder
- Python setup.py build--compiler=mingw32
Python setup.py Install
- Finally in the. \python27\lib\site-packages saw Cvxopt-1.1.7-py2.7.egg-info, and with Ipython can smooth import cvxopt. done!!!
- The way Python is compiled is changed back
- MV C:\Python27\Lib\distutils\cygwinccompiler.py.bak c:\Python27\Lib\distutils\cygwinccompiler.py
- Ok
Install cvxopt under WINDOWS 7