From c525e2a6ae306349f9969da7df2af1e7f90930d4 Mon Sep 17 00:00:00 2001 From: Tom Brown Date: Thu, 19 Dec 2019 11:38:43 +0100 Subject: [PATCH] Install package dependencies nomopyomo branch PyPSA and gurobipy Inelegant - installed by hand in solve_network.py. Should replace with environment.yaml. --- README.md | 10 ++++++++++ scripts/solve_network.py | 7 +++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 07cec605..ef011e1c 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,16 @@ Create a parallel directory for PyPSA-Eur-Sec with: projects % git clone git@github.com:nworbmot/pypsa-eur-sec.git ``` +## Package requirements + +The requirements are the same as +[PyPSA-Eur](https://github.com/PyPSA/pypsa-eur), but for +`solve_network.py` in addition you need `gurobipy` and the `nomopyomo` +branch of PyPSA, which are currently imported "by hand" at the start +of the `solve_network.py` script. The `nomopyomo` branch will be +merged into the future PyPSA release 0.16.0. + + ## Data requirements The data requirements include the JRC-IDEES-2015 database, JRC biomass diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 502c7142..98311153 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -4,10 +4,13 @@ os.system("conda config --add channels http://conda.anaconda.org/gurobi") os.system("conda install -y gurobi=8.1.0") +os.system("conda install -y git") -import sys +os.system("pip install -U git+git://github.com/PyPSA/pypsa.git@nomopyomo#egg=pypsa") -sys.path = ["pypsa"] + sys.path +#import sys + +#sys.path = ["pypsa"] + sys.path