Installing cvxopt under WINDOWS 7

Source: Internet
Author: User
Tags lapack

Noisy for several days, finally will cvxopt installation success, here and you share the installation process:

  1. 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).
  2. 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
    •     
  3. 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
      • Sed ' s/_linux/_win/' make.inc-i
      • Make && CP Blas_win.a. /libblas.a
    • Attention:.. /indicates the top-level directory of the current directory
  4. 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
  5. 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
  6. Ok

Install cvxopt under WINDOWS 7

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.