Installation Instructions¶
If you encounter any bugs during installation, please email gpkit@mit.edu.
Mac OS X¶
1. Install Python and build dependencies¶
- Install the Python 2.7 version of Anaconda.
- If you don’t want to install Anaconda, you’ll need gcc, pip, numpy, and scipy, and may find iPython Notebook useful as a modeling environment.
- If
which gccdoes not return anything, install the Apple Command Line Tools.- Optional: to install gpkit into an isolated python environment you can create a new conda virtual environment with
conda create -n gpkit anacondaand activate it withsource activate gpkit.- Run
pip install ctypesgen --prein the Terminal if you want to use a MOSEK solver.
2. Install either the MOSEK or CVXOPT GP solvers¶
- Download CVXOPT, then:
- Read the official instructions and requirements
- In the Terminal, navigate to the
cvxoptfolder- Run
python setup.py install
- Download MOSEK, then:
- Move the
mosekfolder to your home directory- Follow these steps for Mac.
- Request an academic license file and put it in
~/mosek/
3. Install GPkit¶
- Run
pip install gpkitat the command line.- Run
python -c "import gpkit.tests; gpkit.tests.run()"- If you want units support, install pint with
pip install pint.
Linux¶
1. Install either the MOSEK or CVXOPT GP solvers¶
- Download CVXOPT, then:
- Read the official instructions and requirements
- In a terminal, navigate to the
cvxoptfolder- Run
python setup.py install
- Download MOSEK, then:
- Move the
mosekfolder to your home directory- Follow these steps for Linux.
- Request an academic license file and put it in
~/mosek/
2. Install GPkit¶
- _Optional:_ to install gpkit into an isolated python environment, install virtualenv, run
virtualenv $DESTINATION_DIRthen activate it withsource activate $DESTINATION_DIR/bin.- Run
pip install ctypesgen --preat the command line if you want to use a MOSEK solver.- Run
pip install gpkitat the command line.- Run
python -c "import gpkit.tests; gpkit.tests.run()"- If you want units support, install pint with
pip install pint.- You may find iPython Notebook to be useful modeling environment.
Windows¶
1. Install Python dependencies¶
- Install the Python 2.7 version of Anaconda.
- If you don’t want to install Anaconda, you’ll need gcc, pip, numpy, and scipy, and may find iPython Notebook useful as a modeling environment.
- Optional: to install gpkit into an isolated python environment you can create a new conda virtual environment with
conda create -n gpkit anacondaand activate it withsource activate gpkit.- Run
pip install ctypesgen --preat an Anaconda Command Prompt if you want to use a MOSEK solver.
2. Install either the MOSEK or CVXOPT GP solvers¶
Download CVXOPT, then follow these steps to install a linear algebra library
- Download MOSEK, then:
- Follow these steps for Windows.
- Request an academic license file and put it in
~/mosek/
3. Install GPkit¶
- Run
pip install gpkitat an Anaconda Command Prompt.- Run
python -c "import gpkit.tests; gpkit.tests.run()"- If you want units support, install pint with
pip install pint.