-
Notifications
You must be signed in to change notification settings - Fork 137
SolydXK, Debian (stable)
<- Back to Installation help (other OS)
- Basic Installation
- Install gurobi solver
- Install matplotlib
- Install networkx/pygraphviz to plot graphs
On a freshly installed system I had to install the following packages.
sudo apt install python-virtualenv python3-dev pkg-config libfreetype6-dev glpk-utils coinor-cbc python3-tk
The example code below needs to be adapted to your version and your paths.
- Download actual solver from: http://www.gurobi.com
- Copy to installation directory:
sudo cp ~/downloads/gurobi7.5.1_linux64.tar.gz /opt/
- Change to the installation directory
cd /opt
- Unpack the solver:
sudo tar xvfz gurobi7.5.1_linux64.tar.gz
- Get your licence and install it using
/opt/gurobi751/linux64/bin/grbgetkey [yourcode]
- Add the follwoing to the
.xsessionrc
in your home directory:
export GUROBI_HOME="/opt/gurobi751/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin"
export LD_LIBRARY_PATH="${GUROBI_HOME}/lib"
export GRB_LICENSE_FILE="/path/to/gurobi.lic"
- Got to your installation folder with
cd /opt/gurobi751/linux64/
and execute the python installationsudo python setup.py install
- Check you favourite example with
solver='gurobi'
The following might be necessary. Please check out if plotting works, otherwise you can follow this instruction:
After I followed the installation instructions for oemof 'Using Virtualenv', I had to modify the matplotlibrc. Just change the backend-line:
backend : agg
to
backend : tkagg
You activate your virtualenv by using the following command:
source your_env_name/bin/activate
You can change the matplotlibrc using nano (python version may be different):
nano your_env_name/lib/python3.4/site-packages/matplotlib/mpl-data/matplotlibrc
Now the examples should work.
oemof_examples simple_dispatch
Use your package manager to install the following packages.
sudo apt install graphviz graphviz-dev pkg-config
Use pip with special options to install networkx and pygraphviz.
pip install pygraphviz --install-option="--include-path=/usr/include/graphviz" --install-option="--library-path=/usr/lib/graphviz/"
pip install networkx