rminiconda
rminiconda copied to clipboard
pip install fails
The code below shows the error I get when trying to install a Python package (just used shap
like in the README) in my miniconda.
library(rminiconda)
rminiconda::install_miniconda(path = "C:/Users/spi/dev/miniconda-test", name = "xyzzy")
#> Error in rminiconda::install_miniconda(path = "C:/Users/spi/dev/miniconda-test", : An installation already exists at:
#> C:\Users\spi\dev\miniconda-test\xyzzy
#> If you'd like to install a fresh version, first run:
#> remove_miniconda(path = "C:/Users/spi/dev/miniconda-test", name = "xyzzy")
Sys.setenv(R_MINICONDA_PATH = "C:/Users/spi/dev/miniconda-test")
Sys.getenv("R_MINICONDA_PATH")
#> [1] "C:/Users/spi/dev/miniconda-test"
rminiconda_pip_install("shap", "xyzzy")
#> Warning in rminiconda_pip_install("shap", "xyzzy"): There was an issue
#> installing Python module 'xyzzy'.
Created on 2019-10-25 by the reprex package (v0.3.0)
This works for me. Perhaps there's something Windows-specific going on?
I think the issue is due to the fact that you need to control the environment (variables) you use when executing system2()
.
For example I was able to install via pip
(on the command line) only after I prepended my PATH with the R_MINICONDA_PATH
and the relevant Scripts
, Library
directories...and activate
d conda.
Have you tried to install in a non-default location? Does it work for you? On which OS?
Interesting. It worked for me in a non-default location on MacOS (following your example but with path /tmp/xyzzy
.
In my windows machine, the same process have error due to ssl issue:
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping