The MOSEK Python optimizer API manual Version 7.0 (Revision 141)

Optimizer API for Python - Documentation - Mosek Optimizer API for Python - Documentation - Mosek

25.11.2015 Views

18 CHAPTER 3. GETTING SUPPORT AND HELP

Chapter 4 Testing installation and compiling examples This chapter describes how to verify that the MOSEK Python API has been installed and works, and how to run the Python examples distributed with MOSEK. To use the MOSEK Python API, a working MOSEK installation must be present — see the MOSEK Installation manual for instructions. Part of this installation are two versions of the Python interface; one for Python 2.5 and later, and one for the Python 3 series. Note that MOSEK can use onedimensional arrays from the NumPy package from scipy.org. In case NumPy is not installed, the MOSEK/Python interface includes a minimal array implementation, mosek.array, that supports the basic array functionality for a limited number of native types. A Python installer can be obtained from the official site: http://www.python.org/ The NumPy package providing arrays and mathematical functionality can be obtained from: http://numpy.scipy.org/ Note that the architecture of the Python binary and the MOSEK DLL must match: A 32 bit MOSEK can only be used from a 32 bit Python, and a 64 bit MOSEK can only be used from a 64 bit Python. The architecture of the Python binary can be checked using the following command: python -c "print( import (’platform’).architecture())" 4.1 Microsoft Windows platform MOSEK includes a binary Python that can be used interactively or for running scripts, but if you have a Python installed on your system you may prefer to use that instead. The MOSEK installer does not 19

Chapter 4<br />

Testing installation and compiling<br />

examples<br />

This chapter describes how to verify that the <strong>MOSEK</strong> <strong>Python</strong> <strong>API</strong> has been installed and works, and<br />

how to run the <strong>Python</strong> examples distributed with <strong>MOSEK</strong>.<br />

To use the <strong>MOSEK</strong> <strong>Python</strong> <strong>API</strong>, a working <strong>MOSEK</strong> installation must be present — see the <strong>MOSEK</strong><br />

Installation <strong>manual</strong> for instructions. Part of this installation are two versions of the <strong>Python</strong> interface;<br />

one for <strong>Python</strong> 2.5 and later, and one for the <strong>Python</strong> 3 series. Note that <strong>MOSEK</strong> can use onedimensional<br />

arrays from the NumPy package from scipy.org. In case NumPy is not installed, the<br />

<strong>MOSEK</strong>/<strong>Python</strong> interface includes a minimal array implementation, mosek.array, that supports the<br />

basic array functionality for a limited number of native types.<br />

A <strong>Python</strong> installer can be obtained from the official site:<br />

http://www.python.org/<br />

<strong>The</strong> NumPy package providing arrays and mathematical functionality can be obtained from:<br />

http://numpy.scipy.org/<br />

Note that the architecture of the <strong>Python</strong> binary and the <strong>MOSEK</strong> DLL must match: A 32 bit <strong>MOSEK</strong><br />

can only be used from a 32 bit <strong>Python</strong>, and a 64 bit <strong>MOSEK</strong> can only be used from a 64 bit <strong>Python</strong>.<br />

<strong>The</strong> architecture of the <strong>Python</strong> binary can be checked using the following command:<br />

python -c "print( import (’platform’).architecture())"<br />

4.1 Microsoft Windows platform<br />

<strong>MOSEK</strong> includes a binary <strong>Python</strong> that can be used interactively or for running scripts, but if you have<br />

a <strong>Python</strong> installed on your system you may prefer to use that instead. <strong>The</strong> <strong>MOSEK</strong> installer does not<br />

19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!