Closed mkvdhulst closed 9 months ago
Probably best to have a separate environment for premise.
Otherwise, if you want to live dangerously, you could remove the pinned requirement and see what happens. (may break everything, who knows...)
I did it with the 'python_requires=">=3.9,<3.11"' because I was too lazy to install a different python version and it works fine, but changes in bw2io are most likely much more critical.
The way to do it with conda is a bit convoluted I think, so this is how it would go with pip (should work in your existing conda env)
That should reinstall it with a different pinned dependency. (may not work anymore though...)
Oh. probably you could also just change this directly in the environment meta file. I only use conda for activity browser, but here is an example of where it might be changed. Just find the 'premise."something".json' in your conda environment and do the same edit as before.
maybe it will then allow you to upgrade bw2io, maybe not...
Indeed, premise
did require bw2io 0.8.7
before, because 0.8.8
struggles with reading CSVs.
However, I since removed the version requirements in premise 1.6.9
and 1.7.0
, because bw2io 0.8.10
has been released. So, in summary, you should be able to upgrade bw2io
to 0.8.10
and premise
to 1.7.0
.
I tried @Stew-McD suggestions, but this did not resolve the issue for me. Next, I tried the approach proposed by @romainsacchi. I was not able to create an environment containing both premise 1.7.0
and bw2io 0.8.10
through conda install
. Whether I would first install bw2io
or premise
did not make a difference. There are incompatible packages which conda has a great difficulty in handling. I ended up setting up a new environment with conda create -n [name] bw2io=0.8.10
and subsequently installed premise
through pip install premise==1.7.0
. However, this again downgraded bw2io
to 0.8.7
, despite the dependencies being more loosely defined for premise 1.7.0
. So I also installed bw2io
with pip via pip install bw2io==0.8.10
. This worked, but I did get a warning for dependency conflicts:
pypardiso 0.4.2 requires mkl, which is not installed. premise 1.7.0 requires bw2io==0.8.7, but you have bw2io 0.8.10 which is incompatible.
Nonetheless, I was able to get premise 1.7.0
running this way and apply it to ecoinvent 3.9.1 (the main reason I need bw2io >0.8.7
). I did run into a memory error at some point, but I think that problem is on my side. I will report on it, should it persist.
Now premise
(1.7.2, in the release pipeline) requires bw2io>=0.8.10
. So that should solve the issue. bw2io==0.8.10
allows installing all ecoinvent versions. Please re-open this issue if it's not the case.
I created a new environment and installed bw2 through
conda create -n [name] brightway2 jupyterlab
, which installsbrighway2 2.4.3
withbw2io 0.8.8
.When I subsequently install premise through
conda install premise
, I getpremise-2023.04.25
.Forcing the install of the latest version through
conda install premise=1.6.9
results in a downgrade frombw2io 0.8.8
tobw2io 0.8.7
.When I try to upgrade back to
bw2io 0.8.8
throughconda install -c conda-forge bw2io=0.8.8
it fails to solve the environment.Perhaps setting the requirement of premise more flexible for bw2io would resolve my problem. Is there a way this can be done?