Unable to update plotly to the latest version of 5.5.0 in anaconda

I have Plotly 5.1.0 installed in an environment named “pytorch3d” in Anaconda, as shown in Anaconda Powershell prompt as administrator:

(pytorch3d) PS C:\Windows\system32> conda list plotly
# packages in environment at C:\Users\USERNAME\.conda\envs\pytorch3d:
#
# Name                    Version                   Build  Channel
plotly                    5.1.0                    pypi_0    pypi

Strangely, the version of plotly as shown in Anaconda Navigator for this environment is 5.5.0:

So, my first two questions are: why is there such a discrapency? And, how to solve this problem?

In addition, I’m unable to update plotly to the latest version of 5.5.0, using the following method, and the version of plotly is still 5.1.0, as shown in terminal using the command conda list plotly:

(pytorch3d) PS C:\Windows\system32> conda install -c plotly plotly
Collecting package metadata (current_repodata.json): done
Solving environment: done
# All requested packages already installed.

So, my third quetion is: How to update plotly to its latest version in anaconda commmand line, if the above is not working?

Strangely, the plotly showing in pip list is the latest v5.5.0:

(pytorch3d) PS C:\Windows\system32> pip install plotly==5.5.0
Requirement already satisfied: plotly==5.5.0 in c:\users\USERNAME\.conda\envs\pytorch3d\lib\site-packages (5.5.0)
Requirement already satisfied: tenacity>=6.2.0 in c:\users\USERNAME\.conda\envs\pytorch3d\lib\site-packages (from plotly==5.5.0) (8.0.1)
Requirement already satisfied: six in c:\users\USERNAME\.conda\envs\pytorch3d\lib\site-packages (from plotly==5.5.0) (1.16.0)

Allow me to reply to myself.

  1. uninstall plotly from both anaconda and python:
    conda uninstall plotly
    pip uninstall plotly

  2. install the latest version of plotly (v5.5.0) in the currently active anaconda environment:

(pytorch3d) C:\Users\USERNAME> conda install -c plotly plotly=5.5.0
(pytorch3d) C:\Users\USERNAME> conda list plotly
# packages in environment at C:\Users\USERNAME\.conda\envs\pytorch3d:
#
# Name                    Version                   Build  Channel
plotly                    5.5.0                      py_0    plotly

Sounds like you got it sorted out. Since I’ve had my own challenges juggling conda and pip, this might help others to give a little more info.

The build ‘pypi_0’ and channel ‘pypi’ you showed initially meant that the 5.1.0 version your environment was using had been installed with pip at some point, rather than conda.

Anaconda docs recommend installing packages in a conda virtual environment with conda when possible, and only use pip if/when something you need is not available from a conda channel. It can be messy to step backwards once you have, like if you run into package compatibility issues (I’ve been there!). Frequently people intentionally ignore this warning though, and many times you can get away with it, but I would think install plotly with pip and conda both in an environment is a dead end at some point.

1 Like

Dear @kmhurchla , thank you for the advice.

1 Like