How to solve issues with OpenSSL when trying to run package in R that requires Python?

I'm trying to create a basic neural network using the following packages;
library(keras)
library(mlbench)
library(dplyr)
library(magrittr)
library(neuralnet)

When I get to the stage where I am compiling the model, I run into some errors regarding SSL.

##compiling model
model <- keras_model_sequential()
model %>%
layer_dense(units = 5, activation = 'relu', input_shape = c(13)) %>%
layer_dense(units = 1)

#errors

  • "C:/Users/username/AppData/Local/r-miniconda/condabin/conda.bat" "create" "--yes" "--prefix" "C:/Users/username/AppData/Local/r-miniconda/envs/r-reticulate" "python=3.8" "numpy" "--quiet" "-c" "conda-forge"
    Collecting package metadata (current_repodata.json): ...working... failed

CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to
download and install packages.

Exception: HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /conda-forge/win-64/current_repodata.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))

##troubleshooting

I have OpenSSL downloaded (the newest version 3.0.5), where I have added this location to the Path of my Environmental Variables (Sytems Variables)...
C:\Program Files\OpenSSL-Win64\bin.

I have Anaconda3 downloaded, and have also added the following to the Path to the Environmental Variables (Systems Variable) as;
C:\Users\username\anaconda3\Lib\site-packages\OpenSSL.

The package openssl is also installed in R.

Not sure how to overcome this problem. Perhaps it is an issue based on where it directs intiially (with the r-miniconda), but not sure how to redirect to the path to the already installed Anaconda3 package?

Any help would be appreciated please.

Same problem here trying to install Tensporflow for R.
CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to
download and install packages.

Same issue here. Ran below codes:

install.packages("tensorflow")
library(tensorflow)
install_tensorflow()

Getting below error: Collecting package metadata (current_repodata.json): ...working... failed

CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to
download and install packages.

Exception: HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /conda-forge/win-64/current_repodata.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))

Error: Error creating conda environment 'C:/Users/Barsha/AppData/Local/r-miniconda/envs/r-reticulate' [exit code 1]

Adding another person experiencing this issue.
Installing TF on a new box (Windows 10) and getting the same errors:

Collecting package metadata (current_repodata.json): ...working... failed

CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to
download and install packages.

Exception: HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /conda-forge/win-64/current_repodata.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))

I do not know if it will work for you, ... I had the same problem and by chance I ran my samples cases using an administrator session and everything was installed and executed beautifully. In the very moment I switch to my 'regular' Windows 10 user, ... the same as you all. No even the installation of Keras or Tensorflow.
Hope this helps, somehow.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.