message_ix icon indicating copy to clipboard operation
message_ix copied to clipboard

Fail to import Reporter from message_ix.reporting

Open BinghaoHe opened this issue 3 years ago • 5 comments

When I run the Westeros tutorial (westeros_baseline.ipynb), I fail to import Reporter in the "Plotting Results" section. when running the script: from message_ix.reporting import Reporter

It raises an error: ImportError: cannot import name 'add' from 'ixmp.reporting.computations' (C:\Users\A\anaconda3\envs\message_env\lib\site-packages\ixmp\reporting\computations.py)

BinghaoHe avatar Jun 06 '22 08:06 BinghaoHe

When creating this issue, you should have seen a template for a bug report. The template prompts you to include the output of message-ix show-versions. Without this information it is very difficult to guess at potential causes for the error you mention.

khaeru avatar Jun 06 '22 13:06 khaeru

I do get the same error. Checking the packages add and product are simply not existing in that module. I use

Python: 3.9.13 ixmp: 3.5.0 message_ix: 3.1.0

fwitte avatar Aug 01 '22 12:08 fwitte

ixmp: 3.5.0 message_ix: 3.1.0

I suspect this combination will never work together; at least, we do not advertise or test that it will. You should run the latest releases of both ixmp and message_ix.

khaeru avatar Aug 01 '22 12:08 khaeru

Those are the versions I have gotten by following the installation instructions for conda.

fwitte avatar Aug 01 '22 12:08 fwitte

Those are the versions I have gotten by following the installation instructions for conda.

This is a distinct issue, then. We have had some other issues in the past with conda/Anaconda refusing to install the most recent versions of ixmp and/or message-ix, visible at https://github.com/iiasa/message_ix/search?q=conda&type=issues. These were variously problems in conda itself; in message-ix's packaging; and with users' individual environments.

Please open a new issue describing exactly which steps you took, and showing output/resulting versions.

khaeru avatar Aug 03 '22 11:08 khaeru

  • #637 closes this issue as well, I suppose.

glatterf42 avatar Mar 21 '23 14:03 glatterf42