Skip to content

Can't resolve numpy version conflicts in COlab #347

@alew46

Description

@alew46

I'm trying to step through the install steps of the simple end-to-end demo. After I import Lightweight, jax and numpyro:

!pip install --upgrade git+https://github.com/google/lightweight_mmm.git

'import jax.numpy as jnp
import numpyro'

And then attempt to import the MMM elements:

from lightweight_mmm import lightweight_mmm
from lightweight_mmm import optimize_media
from lightweight_mmm import plot
from lightweight_mmm import preprocessing
from lightweight_mmm import utils

I get an error on the plot import that implicates a mismatched numpy version:

[/usr/local/lib/python3.11/dist-packages/matplotlib/transforms.py](https://localhost:8080/#) in <module>
     47 
     48 from matplotlib import _api
---> 49 from matplotlib._path import (
     50     affine_transform, count_bboxes_overlapping_bbox, update_path_extents)
     51 from .path import Path

ImportError: numpy.core.multiarray failed to import

After researching, I've tried following the advisories to upgrade numpy, downgrade matplotlib, etc. I can't find the blend that results in an error-free install.

Does anyone have this working in Colab currently?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions