简体   繁体   中英

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. However, I cannot get conda to install the 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. How can I get this package installed so that I can import it using rpy2.

Solution : I found a solution here: https://stackoverflow.com/a/55300553/6604617

In anaconda prompt enter this:

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.

However, that list does not cover all of the thousands of R packages in existence. Running R's install.packages() will let you install packages for R's own central package archive.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM