OMS-NetZero / FAIR

Finite-amplitude Impulse Response simple climate model
https://docs.fairmodel.net
Apache License 2.0
120 stars 61 forks source link

cannot import fair modules after installing #148

Closed aliss77777 closed 6 months ago

aliss77777 commented 7 months ago

Hi!

I am following the recommended steps by running pip install fair. I've also tried this in a virtual environment and on a cloud Google Collab noteook.

When attempting to import specific modules (the command below) I get an error no module found:

from fair.RCPs import rcp85

When I look at the folder structure I have installed, I don't see the RCP module. Here's what I see:

Screenshot 2023-11-30 at 4 04 33 PM

This is not good! I want to see something like the picture below. This is what the folder structure looks like on the github branch below, there is a subfolder fair which then contains a subfolder with the RCP's module. How can I fix this?

Screenshot 2023-11-30 at 4 07 15 PM Screenshot 2023-11-30 at 4 07 56 PM

Thank you 🙇🏻‍♂️

rgieseke commented 7 months ago

1.6.4 changed the interface to include SSPs. Which version of FaIR did you install?

https://github.com/OMS-NetZero/FAIR/releases

chrisroadmap commented 7 months ago

you can always pin your version

pip install fair==1.6.4

when installed you can check which version you're running

>>> import fair
>>> fair.__version__

'2.1.3'

version 2.0+ changes the interface and doesn't include these RCP (or SSP) imports now

ta chris

aliss77777 commented 7 months ago

got it thanks! I'm attempting to use the Project Drawdown solution repo (https://github.com/ProjectDrawdown/solutions) and realizing it has not been updated in a while and requires older versions of key libraries like FAIR. If you have worked with that repo at all and know anyone who might be maintaining it I would love to get connected

chrisroadmap commented 7 months ago

I've spoken to them once a while ago but I'm not involved. Without looking can you just create a fork and modify the dependencies in your own fork to pin the version of fair?

chrisroadmap commented 6 months ago

I'll close as relates to an old issue and the dependency is in another repository.