我希望能够在ggplot中使用geom_smooth
。但是,当我键入conda install ggplot
时,会得到错误no packages found in current win-32 channels matching ggplot
。有人知道发生了什么事吗?
你试过浏览www.binstar.org吗?在搜索栏中键入ggplot(我已经这样做了,它会弹出不同的选项,其中一个是win32通道。由于我已经看过了,这是你应该在命令shell中键入的:
conda install -c https://conda.binstar.org/bokeh ggplot
我还没有测试,因为我有win64,但这应该工作
更新:上面的链接现在已断开,请尝试使用
conda install -c conda-forge ggplot
我认为ggplot根本不是为Anaconda打包的,因为conda search ggplot
找不到任何东西。如何通过pip-pip install ggplot
轻松安装。
我在安装ggplot时遇到了同样的问题。这些方法都不起作用,最终我重新安装了anaconda。然后一切顺利。
自2016年1月起,如果您使用Anaconda发行版,ggplot现在默认安装,因此您只需使用install ggplot
。Python新手,所以这仍然让我感到困惑。
这是有效的,但某些功能被破坏了:
conda install -c bokeh ggplot=0.9.4
从这里安装是最终得到我想要的东西:
conda install -c conda-forge ggplot
conda install -c bokeh ggplot
https://anaconda.org/bokeh/ggplot
也可以做pip install ggplot
或sudo -H python2 pip install ggplot
希望它能帮助到别人,尽管答案很晚:p
选项1
当一个人使用Anaconda时,首先,访问将要工作的环境的命令提示符
然后根据Anaconda的文档运行,使用
conda install -c conda-forge r-ggplot2
其他替代方案包括
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
选项2
正如GitHub官方回购中所建议的那样
# 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")
注意:
- 对于
R
程序包,Anaconda
使用特殊约定,在程序包名称之前使用r-
,例如r-ggplot2
或r-tidyverse
等