polca / premise

Coupling Integrated Assessment Models output with Life Cycle Assessment.
BSD 3-Clause "New" or "Revised" License
101 stars 45 forks source link

Cannot load brightway2 after clean install: bw2_calc has not attribute... #85

Closed Loisel closed 1 year ago

Loisel commented 1 year ago

After a clean install in a fresh environment via conda install -c romainsacchi premise (conda 4.13.0) I end up with the following error message when trying to load brightway2 as part of the example notebook:

module 'bw2calc' has no attribute 'ComparativeMonteCarlo'

Steps to reproduce:

conda create -n test -c romainsacchi premise -y
conda activate test
python -c "import brightway2"

conda log: log.txt

romainsacchi commented 1 year ago

Hi, try to update bw2calc to the latest release version. You can look it up on pypi.

On 26 Sep 2022, at 12:46, Loisel @.***> wrote:

 Assigned #85 to @romainsacchi.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.

Loisel commented 1 year ago

Hi, thanks for the quick reply (as always). From the github page I'd say the most recent version is 2.0.dev12. This is the version that is also installed by conda (see log.txt in the issue desc).

Installing bw2 directly via

conda create -n bw2 -c conda-forge -c cmutel brightway2

works, however.

romainsacchi commented 1 year ago

Right, so that is the development version. Try instead installing v. 1.8.1 https://pypi.org/project/bw2calc/ https://pypi.org/project/bw2calc/

On 26 Sep 2022, at 13:42, Loisel @.***> wrote:

Hi, thanks for the quick reply (as always). From the github https://github.com/brightway-lca/brightway2-calc page I'd say the most recent version is 2.0.dev12. This is the version that is also installed by conda.

— Reply to this email directly, view it on GitHub https://github.com/polca/premise/issues/85#issuecomment-1257904071, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFLOS27YHQ7SVL2GVW7DFNTWAGD3TANCNFSM6AAAAAAQVVHYDM. You are receiving this because you were mentioned.

Loisel commented 1 year ago

This works, thanks. It might be worth adding a note to the installation instructions.