From 9a5ae01a9280ded439afa329bb022a603fe3204b Mon Sep 17 00:00:00 2001 From: Tom Brown Date: Thu, 26 Dec 2019 10:19:26 +0000 Subject: [PATCH] Adjust code to use version 0.16.0 of PyPSA for nomopyomo framework --- README.md | 8 ++++---- scripts/solve_network.py | 8 ++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ef011e1c..c8cb62d9 100644 --- a/README.md +++ b/README.md @@ -40,10 +40,10 @@ projects % git clone git@github.com:nworbmot/pypsa-eur-sec.git 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. +`solve_network.py` in addition you need `gurobipy` and version +>=0.16.0 of PyPSA in order to use the `nomopyomo` framework. These +libraries are currently imported "by hand" at the start of the +`solve_network.py` script. ## Data requirements diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 98311153..addabc2e 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -1,12 +1,8 @@ import os -os.system("conda config --add channels http://conda.anaconda.org/gurobi") +os.system("conda install -y -c gurobi gurobi=8.1.0") -os.system("conda install -y gurobi=8.1.0") - -os.system("conda install -y git") - -os.system("pip install -U git+git://github.com/PyPSA/pypsa.git@nomopyomo#egg=pypsa") +os.system("conda install -y -c conda-forge pypsa=0.16.0") #import sys