Closed LouisK92 closed 1 month ago
Same issue today on python 3.10.4 with matplotlib 3.9.0. Downgrading matplotlib to the last version I had installed in another virtualenv (3.8.4) allowed me to import squidpy.
Same error here, this makes fail the CI of a tool I'm developing.
Same here, on Ubuntu 22.04.4 LTS, here is how I reproduce:
sudo apt-get update && sudo apt-get upgrade
conda update -n base -c conda-forge conda
conda create -n barebones python pip pygeos
conda activate barebones
pip install matplotlib squidpy
python
import squidpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/XXXX/programs/miniconda3/envs/barebones/lib/python3.11/site-packages/squidpy/__init__.py", line 3, in <module>
from squidpy import datasets, gr, im, pl, read, tl
File "/home/XXXX/programs/miniconda3/envs/barebones/lib/python3.11/site-packages/squidpy/pl/__init__.py", line 12, in <module>
from squidpy.pl._spatial import spatial_scatter, spatial_segment
File "/home/XXXX/programs/miniconda3/envs/barebones/lib/python3.11/site-packages/squidpy/pl/_spatial.py", line 17, in <module>
from squidpy.pl._spatial_utils import (
File "/home/XXXX/programs/miniconda3/envs/barebones/lib/python3.11/site-packages/squidpy/pl/_spatial_utils.py", line 29, in <module>
from matplotlib.cm import get_cmap
ImportError: cannot import name 'get_cmap' from 'matplotlib.cm' (/home/XXXX/programs/miniconda3/envs/barebones/lib/python3.11/site-packages/matplotlib/cm.py)
Thanks for pointing this out, will fix over the weekend!
hi, I've just installed squidpy from main in a fresh environment and tried to import squidpy and it works, versions:
❯ python
Python 3.10.14 (main, May 6 2024, 14:42:37) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import squidpy as sq
>>>
❯ conda list | grep matplotlib
matplotlib 3.9.0 pypi_0 pypi
matplotlib-scalebar 0.8.1 pypi_0 pypi
I think this is because it is fixed in main but not release, will cut release now quickly
hi all, thank you for reporting, this has been fixed in the latest release on pypi
Confirmed it works now, thanks for fixing!
It works for me too, now the CI of my tool is passing the tests. Thank you!
Description
matplotlib release v3.9.0 introduces an import error for me when import squidpy.
Downgrading to v3.8.4 solves the issue. (
pip install matplotlib==3.8.4
)Minimal reproducible example
Traceback
Version
1.4.1