[英]How to install the R package movMF for use with rpy2?
I'm doing a multispectral clustering project and I am trying to import the R package movMF into python using rpy2.我正在做一个多光谱聚类项目,我正在尝试使用 rpy2 将 R package movMF 导入 python。 However, I cannot get conda to install the package.
但是,我无法让 conda 安装 package。 I've tried each of the below.
我已经尝试了以下每一项。
conda install -c r-movMF
conda install -f r-movMF
and,和,
conda skeleton cran movMF
conda-build r-movMF
conda install --use-local r-movMF
however I always get the error:但是我总是得到错误:
PackagesNotFoundError: The following packages are not available from current channels:
- r-movmf
Current channels:
- file:///C:/Users/Everett/anaconda3/conda-bld/win-64
- file:///C:/Users/Everett/anaconda3/conda-bld/noarch
- https://conda.anaconda.org/r/win-64
- https://conda.anaconda.org/r/noarch
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Searching anaconda.org pulls up nothing.搜索 anaconda.org 没有任何结果。 How can I get this package installed so that I can import it using rpy2.
我怎样才能安装这个 package 以便我可以使用 rpy2 导入它。
Solution : I found a solution here: https://stackoverflow.com/a/55300553/6604617解决方案:我在这里找到了解决方案: https://stackoverflow.com/a/55300553/6604617
In anaconda prompt enter this:在 anaconda 提示符下输入:
R --slave -e "install.packages('movMF', repos='http://cran.us.r-project.org')"
I'm not sure why this works so anyone who does please post an explanation.我不确定为什么会这样,所以请任何这样做的人发表解释。 Thank you in advance!
先感谢您!
conda/anaconda makes packages for various bits of software available, among which a list of R packages curated by the maintainers of the conda/anaconda repositories. conda/anaconda 为各种可用的软件提供软件包,其中包括由 conda/anaconda 存储库的维护者策划的 R 软件包列表。
However, that list does not cover all of the thousands of R packages in existence.但是,该列表并未涵盖现有的数千个 R 包的全部。 Running R's
install.packages()
will let you install packages for R's own central package archive.运行 R 的
install.packages()
将允许您为 R 自己的中央 package 存档安装包。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.