wdecoster / NanoPlot

Plotting scripts for long read sequencing data
http://nanoplot.bioinf.be
MIT License
407 stars 48 forks source link

Issue with dependency Plotly #321

Closed rzelle-lallemand closed 1 year ago

rzelle-lallemand commented 1 year ago

Just in case anybody else runs into this, there appears to be a problem with version 5.13.1 of the Plotly dependency (which as of this writing is the latest version). I updated Nanoplot to version 1.41.0 via conda earlier this week (conda update nanoplot), and got this error when attempting a run:

$ NanoPlot --fastq ... -o ...
Traceback (most recent call last):
  File ".../anaconda3/envs/.../bin/NanoPlot", line 6, in <module>
    from nanoplot.NanoPlot import main
  File ".../anaconda3/envs/.../lib/python3.6/site-packages/nanoplot/NanoPlot.py", line 24, in <module>
    import nanoplotter
  File ".../anaconda3/envs/.../lib/python3.6/site-packages/nanoplotter/__init__.py", line 1, in <module>
    from .nanoplotter_main import *
  File ".../anaconda3/envs/.../lib/python3.6/site-packages/nanoplotter/nanoplotter_main.py", line 26, in <module>
    import plotly.graph_objs as go
  File ".../anaconda3/envs/.../lib/python3.6/site-packages/plotly/__init__.py", line 35, in <module>
    from plotly import (
  File ".../anaconda3/envs/.../lib/python3.6/site-packages/plotly/io/__init__.py", line 12, in <module>
    from ._renderers import renderers, show
  File ".../anaconda3/envs/.../lib/python3.6/site-packages/plotly/io/_renderers.py", line 7, in <module>
    from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'

See also https://github.com/plotly/plotly.py/issues/4119 ("Plotly 5.13.1 introduces undeclared dependency to 'packaging'"). In my case I rolled back my conda environment to an earlier revision, although I guess people could also just install/update nanoplot normally as long as they specify a non-problematic version of plotly (e.g. conda install nanoplot plotly=5.13.0). This issue should mostly resolve itself once a new version of plotly is released.

wdecoster commented 1 year ago

Thanks for sharing!

rzelle-lallemand commented 1 year ago

Fixed in Plotly v5.14.0 onward (see release notes https://github.com/plotly/plotly.py/releases/tag/v5.14.0 ).