wolberlab / dynophores

Dynamic pharmacophore modeling of molecular interactions
https://dynophores.readthedocs.io
MIT License
31 stars 7 forks source link

Can't run dynoviz (OSError: 'seaborn' is not a valid package style) #65

Closed hubertrybka closed 6 months ago

hubertrybka commented 6 months ago

Hi,

I just installed dynophores using conda.

When running dynoviz -h I get the following error message:

Traceback (most recent call last): File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/matplotlib/style/core.py", line 137, in use style = _rc_params_in_file(style) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/matplotlib/init.py", line 866, in _rc_params_in_file with _open_file_or_url(fname) as fd: File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/contextlib.py", line 137, in enter return next(self.gen) ^^^^^^^^^^^^^^ File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/matplotlib/init.py", line 843, in _open_file_or_url with open(fname, encoding='utf-8') as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'seaborn'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/bmc/miniconda3/envs/dyno/bin/dynoviz", line 6, in from dynophores.cli import main File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/dynophores/init.py", line 8, in from .viz import plot, view2d, view3d File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/dynophores/viz/plot/init.py", line 6, in from . import static File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/dynophores/viz/plot/static.py", line 13, in plt.style.use("seaborn") File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/matplotlib/style/core.py", line 139, in use raise OSError( OSError: 'seaborn' is not a valid package style, path of style file, URL of style file, or library style name (library styles are listed in style.available)

System: Ubuntu 22.04.4 LTS

Thanks for helping me resolve this issue this issue!

dominiquesydow commented 6 months ago

Hi @hubertrybka,

Thanks for reporting this issue, will bring a fix on its way in a moment.

This issue seems to stem from a deprecation in Matplotlib 3.8.0, where the style seaborn changed to seaborn-v0_8:

Support for the seaborn-<foo> styles; use seaborn-v0_8-<foo> instead, or directly use the seaborn API.

https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.8.0.html#removal-of-deprecated-apis

dominiquesydow commented 6 months ago

Reproduced issue in CI: https://github.com/wolberlab/dynophores/actions/runs/8850471029/job/24304829147

dominiquesydow commented 6 months ago

@hubertrybka, I made the changes as part of #66 and released the new 0.3.0 tag. I still need to cut a new conda release but will do that over the weekend.

dominiquesydow commented 6 months ago

Hi @hubertrybka, the new conda release is out :) https://anaconda.org/conda-forge/dynophores

I will close this issue now but please reopen it if needed. Many thanks again for bringing this to our attention!