activitysim icon indicating copy to clipboard operation
activitysim copied to clipboard

activitysim 1.3.1 on conda-forge also requires multimethod=1.9

Open chunhochow opened this issue 10 months ago • 0 comments
trafficstars

activitysim 1.3.1 on conda-forge also requires multimethod=1.9 otherwise the multimethod version installed clashes with pandera-base.

To Reproduce

If you install activitysim 1.3.1 with:

mamba create -n asim activitysim=1.3.1 -c conda-forge --override-channels

Then when running the sandag-abm3-example, you will encounter:

ImportError: cannot import name 'overload' from 'multimethod' (C:\Users\joe\scoop\apps\mambaforge\current\envs\asim131\Lib\site-packages\multimethod\__init__.py)

Explanation

This is because of versioning issues. On conda-forge, activitysim 1.3.1 requires pandera >= 0.15 (https://anaconda.org/conda-forge/activitysim/files). Currently this resolves to pandera-base 0.18.0. The problem being pandera-base 0.18.0 does not have an explicit requirement for multimethod, so the latest multimethod package is installed, which clashes with pandera-base 0.18.0. This is fixed in pandera-base 0.18.1, which requires multimethod <=1.10.0 (https://anaconda.org/conda-forge/pandera-base/files).

Solution

Hacky

When installing activitysim 1.3.1 using conda/mamba, use instead

mamba create -n asim activitysim=1.3.1 multimethod=1.9 -c conda-forge --override-channels

Better

Even though it's an issue on the pandera side, which we can't do anything about, we should probably change the installation requirements for activitysim 1.3.1 on conda-forge to explicitly include multimethod<=1.10.0.

chunhochow avatar Jan 17 '25 00:01 chunhochow