Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Error – cannot install Miniconda with RStudio

I have written a R script where I use some python lines through the reticulate package.
I need to share it with some colleagues who don’t know about programming and I’ve created a batch file so I can run it without them even opening R.

However, I tried using the install_miniconda() function to silently install python to run the code without them knowing (I guess people are reluctant to installing a couple of programs) but R throws an error:

> reticulate::install_miniconda(path="C:/")
# * Installing Miniconda -- please wait a moment ...
# * Downloading "https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe" ...
# trying URL 'https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe'
# Content type 'application/octet-stream' length 74687656 bytes (71.2 MB)
# downloaded 71.2 MB

# Error: Miniconda installation failed [unknown reason]

I tried without passing any path but my computer user has spaces on it so I cannot use it, that’s why I resorted to supplying it with the root path "C:/"

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Can someone help me understand what is happening?

Note: I am using R 4.2.1 on Windows 11 (also tried on Windows 10 with the same result)

>Solution :

Try installing rminiconda from the github like this:

remotes::install_github("hafen/rminiconda")
rminiconda::install_miniconda(name='your_name')

After that you can specify the installation using reticulate like this:

py <- rminiconda::find_miniconda_python("your_name")
reticulate::use_python(py, required = TRUE)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading