linopy icon indicating copy to clipboard operation
linopy copied to clipboard

Broken installation with solvers option

Open dylanjmcconnell opened this issue 2 years ago • 4 comments

Hi there - installation with solvers option seems broken. Specifically, running this (as suggested in the docs):

pip install linopy[solvers]

results in an old version of linopy being install (v0.0.13), which cannot be imported (..e.g from linopy import Model raises an error, related to dataclasses)

Installing linopy normally (pip install linopy), results in v0.1.5 being installed. And installing solvers individually / manually results in it working fine, (so I think it's just specifically installing with solver option that is playing up).

dylanjmcconnell avatar Jun 16 '23 06:06 dylanjmcconnell

Works here:

$ pip install linopy[solvers] 
Collecting linopy[solvers]
  Downloading linopy-0.1.5-py3-none-any.whl (68 kB)

bje- avatar Jun 16 '23 06:06 bje-

Hey all,

@Dylan: Are you working on a Windows machine? There, things are sometimes not so well tested.

Fabian

On 16.06.23 08:28, Ben Elliston wrote:

Works here:

|$ pip install linopy[solvers] Collecting linopy[solvers] Downloading linopy-0.1.5-py3-none-any.whl (68 kB) |

— Reply to this email directly, view it on GitHub https://github.com/PyPSA/linopy/issues/127#issuecomment-1594174459, or unsubscribe https://github.com/notifications/unsubscribe-auth/AESV6P347VV7V763WGQJBV3XLP4KBANCNFSM6AAAAAAZIY66EQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Fabian Hofmann http://fabianhofmann.org/

FabianHofmann avatar Jun 16 '23 07:06 FabianHofmann

Thanks @FabianHofmann - am using linux (Ubuntu) -

in case it's useful - I also tried with a few different python versions (3.11.0 and 3.11.4) and different versions of pip too (22.3.1 and 23.1.2)

dylanjmcconnell avatar Jun 16 '23 07:06 dylanjmcconnell

Thanks I can reproduce it with python 3.11, with python 3.10 it works. It seems that gurobipy does have requirements which are not compatible with the linopy requirement of xarray >= 2022.9. But it is really hard to say what is creating the conflict, as gurobipy is not open-source and does not show its requirements. Let's leave the issue open for others until it resolves itself eventually.

FabianHofmann avatar Jun 21 '23 09:06 FabianHofmann