blob: a29e0eb5c5f026b6307168ed59f4736ba3c4d580 [file] [log] [blame]
Austin Schuh9049e202022-02-20 17:34:16 -08001Python
2======
3
4Python interface supports Python 2.7 and 3.5 or newer.
5
6Pip
7----
8
9.. code:: bash
10
11 pip install osqp
12
13
14Anaconda
15--------
16
17.. code:: bash
18
19 conda install -c conda-forge osqp
20
21
22Sources
23---------
24You need to install the following (see :ref:`build_from_sources` for more details):
25
26- `GCC compiler <https://gcc.gnu.org/>`_
27- `CMake <https://cmake.org/>`_
28
29.. note::
30
31 **Windows**: You need to install **also** the Visual Studio C++ compiler:
32
33 * Python 2: `Visual C++ 9.0 for Python (VC 9.0) <https://www.microsoft.com/en-us/download/details.aspx?id=44266>`_
34
35 * Python 3: `Build Tools for Visual Studio 2017 <https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017>`_
36
37
38Now you are ready to build OSQP python interface from sources. Run the following in your terminal
39
40.. code:: bash
41
42 git clone --recurse-submodules https://github.com/osqp/osqp-python
43 cd osqp-python
44 python setup.py install