Install Plotly in Anaconda
To install plotly in windows on anaconda. Go to anaconda prompt, write in this code :
conda install -c plotly plotly
It will automatically update the modules and the rest should take care of itself. I also did not find the need to close and refresh spyder and the graphs started working on mine
Clearing things up
- Conda is used to install packages (
plotly
is a package,numpy
is a package,cufflinks
is a package etc.) - The list of available packages is found in some index, which in Conda parlance is called a channel. The default, "official" channel is maintained by Anaconda (Conda's developer), but anyone can open his own channel, and use it to distribute custom packages.
So, in the command you've shown:
conda install -c https://conda.anaconda.org/plotly <package>
- The
-c
switch tells Conda to use a custom channel which happens to be calledhttps://conda.anaconda.org/plotly
1 <package>
is the package to download from that channel.- Specifying a channel is optional, and if you don't - then Conda will look in its default channels. But you must specify a package so that Conda knows what to install.
1 This is in fact a channel that belongs to a user called plotly, which is hosted on Anaconda Cloud, a free service offered by Anaconda to host custom channels.
Back to your question
This channel seems to be unmaintained (the plotly
package hosted there is very old). Given that, and the fact that the official plotly documentation says to use pip
, that is what I would use.
Update: plotly updated their conda build, and added conda as an installation option in their GitHub repo (albeit not in their documentation website). So you can now safely use:
conda install -c https://conda.anaconda.org/plotly plotly
or even simpler (since Anaconda Cloud channels are searched automatically):
conda install -c plotly plotly
When using Anaconda Python, conda is the preferred way to install packages, but in any case both conda and pip should be run under Anaconda Prompt on Windows (Start --> Anaconda --> Anaconda Prompt
).
Installing packages from the standard command prompt when you have Anaconda is discouraged and can mess up your Anaconda installation.
If you don't care which version of Plotly you install, just use pip
.
pip install plotly
is an easy way to install the latest stable package for Plotly from PyPi.
pip
is a useful package and dependency management tool, which makes these things easy, but it should be noted that Anaconda's conda
tool will do the same thing.
pip
will install to your Anaconda install location by default.
Check out this description of package and environment management between pip
and conda
.
Edit: The link will show that conda
can handle everything pip
can and more, but if you're not trying to specify the version of the package you need to install, pip
can be much more concise.