polca / premise

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

module 'bw2calc' has no attribute 'ComparativeMonteCarlo' #56

Closed Shima-Fa closed 2 years ago

Shima-Fa commented 2 years ago

Hi, After installing the latest version of Premise(1.0.0) I am running through problems with installed packages and get errors. Right now I am not able to create any new database anymore cause of this error: ....................................................................................................................................................................

AttributeError                            Traceback (most recent call last)
Input In [1], in <module>
      1 from premise import *
----> 2 import brightway2 as bw

File ~\.conda\envs\premise\lib\site-packages\brightway2\__init__.py:3, in <module>
      1 # -*- coding: utf-8 -*
      2 from bw2data import *
----> 3 from bw2calc import *
      4 from bw2io import *
      6 __version__ = (2, 4, 1)

AttributeError: module 'bw2calc' has no attribute 'ComparativeMonteCarlo'

......................................................................................................................................................................... I have the bw2calc version (1.8.0) and brightway2 (2.4.1) installed on my environment.

@cmutel @romainsacchi

Shima-Fa commented 2 years ago

My conda env List:

#### ``` # # Name Version Build Channel appdirs 1.4.4 pypi_0 pypi argon2-cffi 21.3.0 pypi_0 pypi argon2-cffi-bindings 21.2.0 pypi_0 pypi asteval 0.9.26 pypi_0 pypi asttokens 2.0.5 pypi_0 pypi astunparse 1.6.3 pypi_0 pypi attrs 21.4.0 pypi_0 pypi backcall 0.2.0 pypi_0 pypi black 22.1.0 pypi_0 pypi bleach 4.1.0 pypi_0 pypi brightway2 2.4.1 pypi_0 pypi bw-migrations 0.2 pypi_0 pypi bw2analyzer 0.10 pypi_0 pypi bw2calc 1.8.0 pypi_0 pypi bw2data 3.6.2 pypi_0 pypi bw2io 0.8.6 pypi_0 pypi bw2parameters 0.7 pypi_0 pypi bzip2 1.0.8 h8ffe710_4 conda-forge ca-certificates 2021.10.8 h5b45459_0 conda-forge certifi 2021.10.8 pypi_0 pypi cffi 1.15.0 pypi_0 pypi charset-normalizer 2.0.11 pypi_0 pypi click 8.0.3 pypi_0 pypi colorama 0.4.4 pypi_0 pypi constructive-geometries 0.7 pypi_0 pypi country-converter 0.7.4 pypi_0 pypi cryptography 36.0.1 pypi_0 pypi cycler 0.11.0 pypi_0 pypi debugpy 1.5.1 pypi_0 pypi decorator 5.1.1 pypi_0 pypi defusedxml 0.7.1 pypi_0 pypi docopt 0.6.2 pypi_0 pypi eight 1.0.1 pypi_0 pypi entrypoints 0.4 pypi_0 pypi et-xmlfile 1.1.0 pypi_0 pypi executing 0.8.2 pypi_0 pypi fasteners 0.17.3 pypi_0 pypi flask 2.0.2 pypi_0 pypi fonttools 4.29.1 pypi_0 pypi future 0.18.2 pypi_0 pypi idna 3.3 pypi_0 pypi ipykernel 6.8.0 pypi_0 pypi ipython 8.0.1 pypi_0 pypi ipython-genutils 0.2.0 pypi_0 pypi ipywidgets 7.6.5 pypi_0 pypi itsdangerous 2.0.1 pypi_0 pypi jedi 0.18.1 pypi_0 pypi jinja2 3.0.3 pypi_0 pypi jsonschema 4.4.0 pypi_0 pypi jupyter 1.0.0 pypi_0 pypi jupyter-client 7.1.2 pypi_0 pypi jupyter-console 6.4.0 pypi_0 pypi jupyter-core 4.9.1 pypi_0 pypi jupyterlab-pygments 0.1.2 pypi_0 pypi jupyterlab-widgets 1.0.2 pypi_0 pypi kiwisolver 1.3.2 pypi_0 pypi libffi 3.4.2 h8ffe710_5 conda-forge libzlib 1.2.11 h8ffe710_1013 conda-forge lxml 4.7.1 pypi_0 pypi markupsafe 2.0.1 pypi_0 pypi matplotlib 3.5.1 pypi_0 pypi matplotlib-inline 0.1.3 pypi_0 pypi mistune 0.8.4 pypi_0 pypi mrio-common-metadata 0.2 pypi_0 pypi mypy-extensions 0.4.3 pypi_0 pypi nbclient 0.5.10 pypi_0 pypi nbconvert 6.4.1 pypi_0 pypi nbformat 5.1.3 pypi_0 pypi nest-asyncio 1.5.4 pypi_0 pypi notebook 6.4.8 pypi_0 pypi numpy 1.22.2 pypi_0 pypi openpyxl 3.0.9 pypi_0 pypi openssl 3.0.0 h8ffe710_2 conda-forge packaging 21.3 pypi_0 pypi pandas 1.4.0 pypi_0 pypi pandocfilters 1.5.0 pypi_0 pypi parso 0.8.3 pypi_0 pypi pathlib 1.0.1 pypi_0 pypi pathspec 0.9.0 pypi_0 pypi peewee 3.14.8 pypi_0 pypi pickleshare 0.7.5 pypi_0 pypi pillow 9.0.1 pypi_0 pypi pip 22.0.3 pyhd8ed1ab_0 conda-forge platformdirs 2.4.1 pypi_0 pypi premise 1.0.0 pypi_0 pypi premise-gwp 0.5 pypi_0 pypi prettytable 3.0.0 pypi_0 pypi prometheus-client 0.13.1 pypi_0 pypi prompt-toolkit 3.0.26 pypi_0 pypi psutil 5.9.0 pypi_0 pypi pure-eval 0.2.2 pypi_0 pypi pycountry 22.1.10 pypi_0 pypi pycparser 2.21 pypi_0 pypi pygments 2.11.2 pypi_0 pypi pyparsing 3.0.7 pypi_0 pypi pyprind 2.11.3 pypi_0 pypi pyrsistent 0.18.1 pypi_0 pypi python 3.9.10 hcf16a7b_2_cpython conda-forge python-dateutil 2.8.2 pypi_0 pypi python-json-logger 2.0.2 pypi_0 pypi python_abi 3.9 2_cp39 conda-forge pytz 2021.3 pypi_0 pypi pywin32 303 pypi_0 pypi pywinpty 2.0.2 pypi_0 pypi pyxlsb 1.0.9 pypi_0 pypi pyyaml 6.0 pypi_0 pypi pyzmq 22.3.0 pypi_0 pypi qtconsole 5.2.2 pypi_0 pypi qtpy 2.0.1 pypi_0 pypi requests 2.27.1 pypi_0 pypi scipy 1.8.0 pypi_0 pypi send2trash 1.8.0 pypi_0 pypi setuptools 60.7.1 py39hcbf5309_0 conda-forge six 1.16.0 pypi_0 pypi sqlite 3.37.0 h8ffe710_0 conda-forge stack-data 0.1.4 pypi_0 pypi stats-arrays 0.6.5 pypi_0 pypi tabulate 0.8.9 pypi_0 pypi terminado 0.13.1 pypi_0 pypi testpath 0.5.0 pypi_0 pypi tk 8.6.11 h8ffe710_1 conda-forge tomli 2.0.0 pypi_0 pypi toolz 0.11.2 pypi_0 pypi tornado 6.1 pypi_0 pypi tqdm 4.62.3 pypi_0 pypi traitlets 5.1.1 pypi_0 pypi typing-extensions 4.0.1 pypi_0 pypi tzdata 2021e he74cb21_0 conda-forge ucrt 10.0.20348.0 h57928b3_0 conda-forge unicodecsv 0.14.1 pypi_0 pypi unidecode 1.3.2 pypi_0 pypi urllib3 1.26.8 pypi_0 pypi vc 14.2 hb210afc_6 conda-forge voluptuous 0.12.2 pypi_0 pypi vs2015_runtime 14.29.30037 h902a5da_6 conda-forge wcwidth 0.2.5 pypi_0 pypi webencodings 0.5.1 pypi_0 pypi werkzeug 2.0.2 pypi_0 pypi wheel 0.37.1 pyhd8ed1ab_0 conda-forge whoosh 2.7.4 pypi_0 pypi widgetsnbextension 3.5.2 pypi_0 pypi wrapt 1.13.3 pypi_0 pypi wurst 0.3 pypi_0 pypi xarray 0.21.1 pypi_0 pypi xlrd 2.0.1 pypi_0 pypi xlsxwriter 3.0.2 pypi_0 pypi xz 5.2.5 h62dcd97_1 conda-forge ``` ```

romainsacchi commented 2 years ago

Hi @Shima-Fa ,

yes, we've been made aware recently of this issue. Try to downgrade scipy to 1.7.

Shima-Fa commented 2 years ago

@romainsacchi Thank you very much! this problem is solved

tngTUDOR commented 2 years ago

bw2calc 1.8.1 has a fix for this: https://github.com/brightway-lca/brightway2-calc/issues/43