While trying to install scimap on Ubuntu 24.04 in a new environment, ran into the following error:
import scimap as sm
Running SCIMAP 2.3.6
Traceback (most recent call last):
File "", line 1, in
from . import plotting as pl
from .densityPlot2D import densityPlot2D
import mpl_scatter_density
from pkg_resources import get_distribution, DistributionNotFound
ModuleNotFoundError: No module named 'pkg_resources'
$ pip install setuptools
Requirement already satisfied
import scimap as sm
Running SCIMAP 2.3.6
Traceback (most recent call last):
File "", line 1, in
from . import plotting as pl
from .densityPlot2D import densityPlot2D
import mpl_scatter_density
from pkg_resources import get_distribution, DistributionNotFound
ModuleNotFoundError: No module named 'pkg_resources'
--
Even though pip says the requirement is satisfied, the version (82.0.1) is very recent, in which setuptools (specifically starting around v70+), pkg_resources has been officially deprecated and removed in favor of importlib.metadata.
Because the sub-dependency mpl_scatter_density is older and still relies on the old pkg_resources way of doing things, it breaks on a recent version.
The Fix: Downgrade Setuptools to a version that still includes pkg_resources. Version 69.5.1 is the last stable release before major removals began.
$ pip install "setuptools<70.0.0"
solved the issue.
While trying to install scimap on Ubuntu 24.04 in a new environment, ran into the following error:
$ pip install setuptools
Requirement already satisfied
Even though pip says the requirement is satisfied, the version (82.0.1) is very recent, in which setuptools (specifically starting around v70+), pkg_resources has been officially deprecated and removed in favor of importlib.metadata.
Because the sub-dependency mpl_scatter_density is older and still relies on the old pkg_resources way of doing things, it breaks on a recent version.
The Fix: Downgrade Setuptools to a version that still includes pkg_resources. Version 69.5.1 is the last stable release before major removals began.
$ pip install "setuptools<70.0.0"
solved the issue.