How to install Plotly in Anaconda?
The https://conda.anaconda.org/plotly says to conda install -c https://conda.anaconda.org/plotly <package>
, and
The https://plot.ly/python/user-guide/ says to pip install plotly
. I.e., without package.
So which packages I should specify in Anaconda conda?
I tried without one and get errors:
C:\>conda install -c https://conda.anaconda.org/plotly
Error: too few arguments, must supply command line package specs or --file
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.
plotly
is a package, numpy
is a package, cufflinks
is a package etc.)So, in the command you've shown:
conda install -c https://conda.anaconda.org/plotly <package>
-c
switch tells Conda to use a custom channel which happens to be called https://conda.anaconda.org/plotly
1
<package>
is the package to download from that channel.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.
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.
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
Using Anaconda, the following worked for me:
To search for which plotly packages are available on anaconda:
anaconda search -t conda plotly
This will provide a list of user/package for plotly available.
Decide which user/package works for your operating system and which version of Plotly you want. Then to get more information about that type in: anaconda show [user]/[package]
. Installation instruction should be provided near the end. Typically, this is: conda install --channel https://conda.anaconda.org/[user] [package]
where you should replace [user] and [package] with the user/package of your preference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With