I am trying to use the reticulate()
package in R to run some Python packages.
I run the following:
library(reticulate)
py_install("pandas")
I obtain this error:
Error: could not find a Python environment for /usr/bin/python3
Running py_config()
gives:
python: /usr/bin/python3
libpython: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6.so
pythonhome: //usr://usr
version: 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0]
numpy: /home/user/.local/lib/python3.6/site-packages/numpy
numpy_version: 1.18.1
tensorflow: /home/user/.local/lib/python3.6/site-packages/tensorflow
python versions found:
/home/user/.virtualenvs/r-reticulate/bin/python
/usr/bin/python3
/usr/bin/python
/home/user/anaconda3/bin/python
/home/user/env/bin/python
/home/user/miniconda3/bin/python
When I navigate to /usr/bin/
there is a file called python3.7
and there is a folder called python3
but when I try to open it I get the following error Directory /usr/bin/python3.6: no such file or directory
. I cannot open or access the python3
folder (or any folder) in the /usr/bin/
directory.
I also run
use_python("/home/user/miniconda3/lib/python3.7/")
py_install("pandas")
Which gives me the same error.
I am running an AWS Ubuntu instance with RStudio installed.