open2c / coolpuppy

A versatile tool to perform pile-up analysis on Hi-C data in .cool format.
MIT License
77 stars 11 forks source link

[BUG]Import error `from coolpuppy import plotpup` #147

Closed zhaoyycrow closed 3 months ago

zhaoyycrow commented 3 months ago

Describe the bug Unable to import plotpup from coolpuppy from coolpuppy import plotpup

ImportError Traceback (most recent call last) Cell In[1], line 15 13 from coolpuppy.lib import numutils 14 from coolpuppy.lib.puputils import divide_pups ---> 15 from coolpuppy import plotpup 16 import cooler 17 import bioframe

File /ext3/miniconda3/lib/python3.12/site-packages/coolpuppy/plotpup.py:14 11 from matplotlib import cm 12 import seaborn as sns ---> 14 from cooltools.lib import plotting 16 import logging 17 import warnings

File /ext3/miniconda3/lib/python3.12/site-packages/cooltools/lib/plotting.py:5 1 """ 2 Migrated from :mod:mirnylib.plotting. 3 4 """ ----> 5 from matplotlib.cm import register_cmap 6 import matplotlib as mpl 7 import matplotlib.pyplot as plt

ImportError: cannot import name 'register_cmap' from 'matplotlib.cm' (/ext3/miniconda3/lib/python3.12/site-packages/matplotlib/cm.py)

To Reproduce python --version Python 3.12.3

pip show matplotlib Name: matplotlib Version: 3.9.0

pip show coolpuppy Name: coolpuppy Version: 1.1.0

Expected behavior Packages imported

Results / Error Error, can't import package

System

Phlya commented 3 months ago

For now downgrade matplotlib to 3.8, it's a new release breaking cooltools.

zhaoyycrow commented 3 months ago

Thanks! Just noticed the update. That solved it (for now).