This repository has been archived by the owner on Apr 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
156 lines (103 loc) · 5.33 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
This document describes the standard CVXOPT installation procedure. For more
information, please consult the CVXOPT website <www.cvxopt.org>.
Installing a pre-built package
==============================
Installing via conda
--------------------
The `conda-forge <http://anaconda.org/conda-forge/cvxopt>`_ channel
provides pre-built CVXOPT packages for Linux and macOS that can be
installed using `conda <https://conda.io/docs/>`_::
conda install -c conda-forge cvxopt
These pre-built packages are linked against OpenBLAS and include the optional extensions
GLPK, GSL, and FFTW.
Installing via pip
------------------
A pre-built binary wheel package can be installed
using `pip <https://pip.pypa.io>`_::
pip install cvxopt
Wheels for Linux:
* are available for Python 2.7, 3.3, 3.4, 3.5, and 3.6 (32 and 64 bit)
* are linked against OpenBLAS
* include all optional extensions (DSDP, GLPK, GSL, and FFTW)
Wheels for macOS:
* are available for Python 2.7, 3.4, 3.5, and 3.6 (universal binaries)
* are linked against OpenBLAS
* include all optional extensions (DSDP, GLPK, GSL, and FFTW)
Wheels for Windows:
* are available for Python 2.7, 3.4, 3.5, and 3.6 (64 bit only)
* are linked against MKL
* Python 3.5+ wheels include the optional extension GLPK (wheels for Python 2.7 and 3.4 include none of the optional extensions)
Building and installing from source
===================================
Required and optional software
------------------------------
The package requires version 2.7 or 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.
The following software libraries are optional.
* The GNU Scientific Library GSL <www.gnu.org/software/gsl>.
* FFTW <www.fftw.org> is a C library for discrete Fourier transforms.
* GLPK <www.gnu.org/software/glpk/glpk.html> is a linear programming
package.
* MOSEK version 8 <www.mosek.com> is a commercial library of convex
optimization solvers.
* DSDP5.8 <www-unix.mcs.anl.gov/DSDP> is a semidefinite programming solver.
Customizing the setup script
----------------------------
If needed, the default compilation can be customized by editing setup.py or
by defining some environment variables. The following variables in the setup
script can be modified:
* BLAS_LIB_DIR: the directory containing the LAPACK and BLAS libraries.
* BUILD_GSL: set this variable to 1 if you would like to use the GSL
random number generators for constructing random matrices in CVXOPT.
If BULD_GSL is 0, the Python random number generators will be used
instead.
* GSL_LIB_DIR: the directory containing libgsl.
* GSL_INC_DIR: the directory containing the GSL header files.
* BUILD_FFTW: set this variable to 1 to install the cvxopt.fftw module,
which is an interface to FFTW.
* FFTW_LIB_DIR: the directory containing libfftw3.
* FFTW_INC_DIR: the directory containing fftw.h.
* BUILD_GLPK: set this variable to 1 to enable support for the linear
programming solver GLPK.
* GLPK_LIB_DIR: the directory containing libglpk.
* GLPK_INC_DIR: the directory containing glpk.h.
* BUILD_DSDP: set this variable to 1 to enable support for the semidefinite
programming solver DSDP.
* DSDP_LIB_DIR: the directory containing libdsdp.
* DSDP_INC_DIR: the directory containing dsdp5.h.
* SUITESPARSE_LIB_DIR: the directory containing SuiteSparse libraries.
* SUITESPARSE_INC_DIR: the directory containing SuiteSparse header files.
* SUITESPARSE_SRC_DIR: the directory containing SuiteSparse source. The
variables SUITESPARSE_LIB_DIR and SUITESPARSE_INC_DIR are ignored and
relevant parts of SuiteSparse are built from source when
SUITESPARSE_SRC_DIR is specified.
* MSVC: set this variable to 1 if compiling with MSVC 14 or later
Each of the variables can be overridden by specifying an environment variable
with the prefix "CVXOPT_". For example, the following command installs CVXOPT
locally with BUILD_FFTW=1:
CVXOPT_BUILD_FFTW=1 python setup.py install --user
Support for the linear, second-order cone, and quadratic programming
solvers in MOSEK is automatically enabled if both MOSEK and the MOSEK
Python interface are installed.
Installation
------------
CVXOPT can be installed globally (for all users on a UNIX system) using
the command:
python setup.py install
It can also be installed locally (for a single user) using the command:
python setup.py install --user
To test that the installation was successful, run the included tests using
python -m unittest discover -s tests
or alternatively, if `nose` is installed,
nosetests
If Python does not issue an error message, installation was successful.
Additional information can be found in the
Python documentation <http://docs.python.org/install/index.html>.