GangCaoLab / CoolBox

Jupyter notebook based genomic data visualization toolkit.
https://gangcaolab.github.io/CoolBox/index.html
GNU General Public License v3.0
227 stars 37 forks source link

ImportError: cannot import name 'BrokenBarHCollection' from 'matplotlib.collections' #103

Open Fougere87 opened 3 weeks ago

Fougere87 commented 3 weeks ago

Hi,

I tried to use coolbox but when importing the API, it throws this error: ImportError: cannot import name 'BrokenBarHCollection' from 'matplotlib.collections'

Indeed BrokenBarHCollection is deprecated from matplotlib 3.7.0 (https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.7.0.html#brokenbarhcollection-is-deprecated)

A way to avoid this without downgrading MPL ?

All the best and thank you for your work !

C.

wmorgans commented 1 week ago

I recently had this issue. Did you install with conda install -c bioconda coolbox?

I've gotten a working installation by doing the following.

  1. I installed the requirements in the environment.yml and requirements.txt to a clean conda env.
  2. I cloned the github repo git clone https://github.com/GangCaoLab/CoolBox.git
  3. installed using pip install -e . from within the cloned directory.

Following the instructions for installing from the docs on how to install from source code may also work.