Run python code in r

AM trying to run pytho code in r

Example :
library(reticulate)

py_run_string("import numpy as np")

it gives an error:
Collecting package metadata (current_repodata.json): ...working... failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://conda.anaconda.org/conda-forge/win-64/current_repodata.json
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
'https://conda.anaconda.org/conda-forge/win-64'

Error: Error 1 occurred creating conda environment C:/Users/dbisoi/AppData/Local/r-miniconda/envs/r-reticulate

I can run same code fine using pycharm

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.