pyOpt has the following dependencies:
- Python 2.4+
- Numpy 1.0+
- Swig 1.3+
- c/FORTRAN compiler (compatible with f2py)
Further dependencies to take advantage of parallel computing capabilities are:
- mpi4py
Notes:
- In Windows if python x86 is used numpy-win32 should also be used and MinGW is recommended if c/FORTRAN compilers are not available.
- In Windows if python x86-64 is used numpy-amd64 should also be used and ‘MinGW-W64 <http://mingw-w64.sourceforge.net>’_ is recommended if c/FORTRAN compilers are not available.
- In Linux, the python header files (python-dev) and numpy header files (numpy-dev) are also required.
- In OpenSUSE systems, install pyOpt as superuser, go to pyOpt installed folder and under each optimizer modify the permission so non-superusers can execute the .so files.
To install the pyOpt package in a folder on the Python search path (usually in site-packages/) run:
>>> python setup.py install
Alternatively, to use pyOpt from the current directory without installing it run:
>>> python setup.py inplace
this will compile all available optimizers and place the libraries in the corresponding directory.
Notes:
You may want to uninstall any previous version of pyOpt before installing a new version, as there may be conflicts.
Some optimizers are licensed and their sources are not included with this distribution. To use them, please request their sources from the authors as indicated in the optimizer LICENSE files, and place them in their respective source folders before installing the package.
In Windows, if MinGW is used make sure to install for it the C, C++, and Fortran compilers, verify that the windows path contains a link to the MINGW binary folder and run:
>>> python setup.py install --compiler=mingw32Installing to site-packages/ requires root privileges on Linux.
By default pyOpt will attempt to use compilers available on the system. To get a list of available compilers and their corresponding flag on a specific system use:
>>> python setup.py compilers