Search code examples
rreticulategreta

Trying to install Tensorflow-Probability using reticulate - how to specify user?


In order to install the greta package, I need to first install tensorflow-probability. Tensorflow and Python 3.7 Anaconda are already installed.

When I attempt the following command in R: reticulate::conda_install("r-tensorflow", "tensorflow-probability", pip = TRUE), I get the following:

Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 
'C:\\Users\\PHILTE~1\\ANACON~1\\envs\\r-tensorflow\\Lib\\site-packages\\numpy\\core\\multiarray.cp36-win_amd64.pyd'
Consider using the `--user` option or check the permissions.

I have admin permissions on my laptop, so I'm unsure why I'm getting an access denied. But how do I add the --user command within the reticulate command?


Solution

  • This webpage fixed it all for me: http://preposterior.updog.co/november-8-2018-getting-your-computing-environment-ready-for-greta.html#november-8-2018-getting-your-computing-environment-ready-for-greta

    Steps:

    1. Install Anaconda

    2. Open Anaconda Prompt and run the following:

    conda activate r-tensorflow

    pip install --no-dependencies tensorflow-probability==0.4.0

    conda install tensorflow=1.11

    pip install h5py pyyaml requests Pillow scipy

    1. Back in R, install the greta package from CRAN.