5

I want to be able to use geom_smooth in ggplot. However, when I typed conda install ggplot, I get the error no packages found in current win-32 channels matching ggplot. Anyone know what is going on?

Gabriel
  • 40,504
  • 73
  • 230
  • 404
user4352158
  • 731
  • 4
  • 13
  • 24

7 Answers7

7

Have you tried looking at www.binstar.org? Type in ggplot in the search bar (I have already done so and it pops up with different options, one of which is a win32 channel. Since I have already looked at it this is what you should type into the command shell:

    conda install -c https://conda.binstar.org/bokeh ggplot

I have not tested since I have win64 but this should work

UPDATE: The link above is now broken try this instead

    conda install -c conda-forge ggplot 
jfish003
  • 1,232
  • 8
  • 12
  • 2
    I finally got ggplot to work, I had to get it by typing `conda install -c https://conda.binstar.org/bokeh ggplot` However, I am unable to display the plot from ggplot if I use `from ggplot import *` and then try something like `plt=ggplot(data=df,aes(x=x, y=y)) +\ geom_line() +\ stat_smooth(colour='blue', span=0.2)` and then `plt.show()` – user4352158 Mar 29 '15 at 05:40
  • It seems like this solution doesn't work anymore -- I can navigate there in a browser, but the installation says `PackagesNotFoundError` :(. – eric_kernfeld May 09 '18 at 18:19
  • Have you tried here? https://anaconda.org/search?q=ggplot Binstar has become Anaconda cloud – jfish003 May 24 '18 at 15:08
4

I think ggplot is simply not packaged for Anaconda as conda search ggplot doesn't find anything. How it can be easily installed via pip -- pip install ggplot.

Paul M.
  • 608
  • 3
  • 11
  • Even if I try `pip install ggplot` it installs successfully, but I still can't use ggplot in PyCharm. When I type `import ggplot as gg`, it says `no module named ggplot` – user4352158 Mar 28 '15 at 04:27
  • I downvoted here bec the solution of @jfish003 worked perfectly for me. and now I draw using the ggplot on the Ipython notebook. So please, don't give uncertain answers that will misleads others like me for i spent 15 hours looking for answers. I even posted a new question on this issue. – stackunderflow Oct 10 '15 at 01:54
  • jfish's answer shows a non-standard way to install ggplot from anaconda. The pip based solution I offered is perfectly correct. If you don't understand how something works please don't downvote. – Paul M. Oct 11 '15 at 14:27
  • @PaulM. I think underflow's point was that the OP, indirectly through verbiage and tags, made it clear s/he wanted an Anaconda solution, if available. As underflow pointed out, there is an Anaconda solution, and it was provided by jfish. Therefore, that solution is simply "better". – Mike Williamson Mar 24 '16 at 01:06
  • @MikeWilliamson stackunderflow didn't just express a preference for the Anaconda solution, but actually down voted an answer that was correct. When someone suggests that the standard Python solution is "misleading" that suggests ignorance of the tools they are using. – Paul M. Mar 25 '16 at 04:25
  • 3
    the https://conda.binstar.org/bokeh ggplot is not maintained by the same people who build ggplot, so it is not the latest version. for the latest version, use pip. (I wrote ggplot) – Greg May 27 '16 at 20:29
1

I ran across the same issue when installing ggplot. None of the methods worked, eventually I reinstalled anaconda. Then everything works smoothly.

Ted
  • 91
  • 1
  • 4
0

As of Jan 2016, ggplot now comes installed by default if you are using the Anaconda distribution so you can just use install ggplot. New to Python so this is still tripping me up.

ultracold
  • 1
  • 2
0

This worked, but certain functionality was broken:

conda install -c bokeh ggplot=0.9.4

Installing from here is what finally got me what I wanted:

conda install -c conda-forge ggplot
Michael Discenza
  • 3,240
  • 7
  • 30
  • 41
0

conda install -c bokeh ggplot

https://anaconda.org/bokeh/ggplot

Also can do pip install ggplot or sudo -H python2 pip install ggplot

Hope it helps someone although a late answer :p

Akash Chandra
  • 375
  • 1
  • 4
  • 13
0

Option 1

As one is using Anaconda, first of all, access the Command Prompt for the environment that one will be working on.

Then run, as per Anaconda's Documentation, use

conda install -c conda-forge r-ggplot2

Other alternatives include

conda install -c "conda-forge/label/cf201901" r-ggplot2

conda install -c "conda-forge/label/cf202003" r-ggplot2

conda install -c "conda-forge/label/gcc7" r-ggplot2

Option 2

As suggested in the official GitHub repo

# The easiest way to get ggplot2 is to install the whole tidyverse:
install.packages("tidyverse")

# Alternatively, install just ggplot2:
install.packages("ggplot2")

# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github("tidyverse/ggplot2")

Notes:

  • For R packages Anaconda uses a special convention that uses r- before the package name, such as r-ggplot2, or r-tidyverse, and more.
Gonçalo Peres
  • 11,752
  • 3
  • 54
  • 83