plotly / plotly.py

The interactive graphing library for Python :sparkles: This project now includes Plotly Express!
https://plotly.com/python/
MIT License
15.62k stars 2.51k forks source link

Fresh conda install of 5.22 gives: ModuleNotFoundError: No module named 'packaging' #4609

Closed jjbastrape closed 1 month ago

jjbastrape commented 1 month ago

Tested on two different machines after using conda update conda. Python 3.11. IDE is PyCharm 2024.1.1. Only packages in the environment are plotly and pandas (required to use plotly express).

Code from the Plotly Getting Started: import plotly.express as px fig = px.bar(x=["a", "b", "c"], y=[1, 3, 2]) fig.write_html('first_figure.html', auto_open=True)

Conda Install: conda install -c plotly plotly=5.22.0 per the Plotly Getting Started

Error: (Removing identifying items in the base file paths) Traceback (most recent call last): File "PlotlyTest\plotlytest.py", line 1, in <module> import plotly.express as px File "miniconda3\envs\PlotlyTest\Lib\site-packages\plotly\express\__init__.py", line 14, in <module> from ._imshow import imshow File "miniconda3\envs\PlotlyTest\Lib\site-packages\plotly\express\_imshow.py", line 3, in <module> from ._core import apply_default_cascade, init_figure, configure_animation_controls File "miniconda3\envs\PlotlyTest\Lib\site-packages\plotly\express\_core.py", line 10, in <module> from packaging import version ModuleNotFoundError: No module named 'packaging'

jjbastrape commented 1 month ago

for some reason recent conda installs did not include "packaging". Conda install packaging fixed the problem.