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'
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 StartedError: (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'