Closed clemlmd closed 3 years ago
Try running this in your environment:
conda install -c conda-forge -c cmutel bw2calc==1.8.0
It looks like the development version 2.0.dev3
of bw2calc was installed, which doesn't include ComparativeMonteCarlo
anymore, that's why you see this error. The command above will downgrade bw2calc to version 1.8.0.
Hi haasad,
Thanks a lot for the answer! :-)
I downgraded bw2calc to version 1.8.0 as you told me. It seems to have solved the previous error.
However, I have a new error message now...
I see, related issue here: brightway-lca/brightway2-data/issues/83
Unless you have a reason to stay with python 3.7, I suggest you delete your current environment and recreate it with python 3.8.
See Chris' suggestion below :point_down:
@clemlmd Thanks for the detailed report.
I think the easiest would be to start a clean environment. You shouldn't mix pip and conda as install tools, this is a recipe for pain, and also installing the brightway2
package already gives you the correct versions of libraries, when you updated bw2data
, etc. manually you installed new versions compatible with Brightway2.5, not Brightway2.
A new environment is relatively easy:
conda create -n LCALab2 -c conda-forge -c cmutel -c haasad brightway2 jupyterlab pywin32 pandas python=3.9
The current release of Python is 3.10, but this is quite new, so not all packages will be available for it. But there is not good reason not to use 3.9.
... and also installing the brightway2 package already gives you the correct versions of libraries, when you updated bw2data, etc. manually you installed new versions compatible with Brightway2.5, not Brightway2
@cmutel Just for my understanding, is this also what throws off the installation of the activity-browser at the moment?
Should the decision of what versions of bw2data, bw2calc and bw2io to install, be completely delegated to the brightway2 package? And setting lower bounds on the versions "overwrites" this behavior? Or does this only happen when installing eg. bw2calc manually in an existing environment?
@haasad Yes, 2.5. is a big change (it is 2.5 because 3 is planned to be a major change, 2.5 is mostly backwards incompatible. There is some description here: https://brightway.groups.io/g/development/message/76.
But the AB is easy to install correctly, just make sure to install the brightway2 package and it will get the right versions.
The brightway2 package has no code, it just gets the versions correct in both setup.py and the conda recipe: https://github.com/cmutel/conda-recipes/blob/master/brightway2/meta.yaml.
bw2calc installed via pip will not install a dev version (2.0.devX), but it will if installed from conda. Go figure.
I don't think the lower bounds are the problem but the sorting, 0.9.dev appears to be less than 0.9 so it fits the <0.9 filter somehow.
Hi cmutel, hi haasad,
Thanks a lot for your help!
Everything seems to be working fine now :-) I can import brightway2 and set it up.
I tried so many things that I think I messed everything up between python 3.6, 3.7 and 3.8.
By the way, if I may suggest something, if I were you I would update the Brightway Installation web page because 1. it is very complicated to find Miniconda 3.6 and 2. you clearly indicate that python 3.6 is needed for the installation (in the command for the creation of the new environment). I tried to follow the instructions on the web page and I obtained these errors you helped me solve.
This is just a suggestion from a beginner's perspective :-)
@clemlmd Thanks, of course this is completely correct. I have updated the docs.
Good morning,
I have been trying to install brightway2 in the framework of my Phd thesis but I have a problem when importing it.
I attach all the steps I followed for the installation.
=> I installed Miniconda3
=> I create a new environment with python 3.7
=> Information from the newly-created environment…
=> conda install -y -q -c conda-forge -c cmutel -c haasad brightway2 jupyter
=> conda install -y -q pywin32
=> conda clean –tipsy
Here I get some warnings… I do not know if they are important or not.
=> conda update -c cmutel -c conda-forge bw2data bw2calc bw2io
=> pip install numpy => conda install pandas
I listed all the packages that I have in my environment. I was thinking that maybe I was not using an updated version of some packages. I dug into that but I could not find anything.
In my opinion, the creation of the environment and the importation of all the packages were fine. However, when I try to import brightway2 in a jupyter notebook, I get this error…
I'm sorry to bother you with this issue but I am beginner with brightway and I do not have any clue about how I could solve the problem. I tried many times to create new environments, update packages etc... but it still doesn't work.
Do you have any clue about it?
Thanks a lot in advance for your time