Installation¶
Sageopt requires Python version 3.5 or higher. There is no way around this: we make heavy use of the @
operator for matrix multiplication, and this operator was only introduced in Python 3.5.
We also require the following packages:
SciPy, version >= 1.1.
Numpy, version >= 1.14.
ECOS, version >= 2.0.
It is highly recommended that you also install MOSEK (version >= 9). MOSEK is a commerical optimization solver, and currently the only solver that is able to handle the more intersting convex relaxations needed for optimization with SAGE certificates. If you are in academia you can request a free academic license for MOSEK.
Pip users¶
Run pip install sageopt
.
Conda users¶
If you use Anaconda for Python development, do the following:
activate your anaconda environment,
run
conda install pip
,run
pip install sageopt
.
It is important that pip be installed inside your conda environment, or sageopt might not be detected by Anaconda Navigator (among other environment management tools).
Installation from source¶
Do the following:
Download this repository. If needed, change your directory so that you are in the same directory as sageopt’s
setup.py
file.Activate the Python virtual environment of your choice.
Run
python setup.py install
to install sageopt to your current Python environment.Run
python -c "import sageopt; print(sageopt.__version__)"
to verify that sageopt installed correctly.Run
pip install nose
(orconda install nose
) in preparation for running unittests.Run
nosetests sageopt/tests
.