I tried to use RAthena but was unable to create an AthenaConnection.
con <- dbConnect(RAthena::athena())
Error: Boto3 is not detected please install boto3 using either: `pip install boto3` in terminal or `install_boto()`.
Alternatively `reticulate::use_python` or `reticulate::use_condaenv` will have to be used if boto3 is in another environment.
I tried install_boto()
:
install_boto()
Using virtual environment 'RAthena' ...
Requirement already up-to-date: cython in /home/rstudio-gavin/.virtualenvs/RAthena/lib/python3.6/site-packages (0.29.15)
Collecting boto3
Downloading boto3-1.12.15-py2.py3-none-any.whl (128 kB)
Collecting botocore<1.16.0,>=1.15.15
Downloading botocore-1.15.15-py2.py3-none-any.whl (5.9 MB)
Requirement already satisfied, skipping upgrade: jmespath<1.0.0,>=0.7.1 in /home/rstudio-gavin/.virtualenvs/RAthena/lib/python3.6/site-packages (from boto3) (0.9.5)
Requirement already satisfied, skipping upgrade: s3transfer<0.4.0,>=0.3.0 in /home/rstudio-gavin/.virtualenvs/RAthena/lib/python3.6/site-packages (from boto3) (0.3.3)
Requirement already satisfied, skipping upgrade: urllib3<1.26,>=1.20; python_version != "3.4" in /home/rstudio-gavin/.virtualenvs/RAthena/lib/python3.6/site-packages (from botocore<1.16.0,>=1.15.15->boto3) (1.25.8)
Requirement already satisfied, skipping upgrade: docutils<0.16,>=0.10 in /home/rstudio-gavin/.virtualenvs/RAthena/lib/python3.6/site-packages (from botocore<1.16.0,>=1.15.15->boto3) (0.15.2)
Requirement already satisfied, skipping upgrade: python-dateutil<3.0.0,>=2.1 in /home/rstudio-gavin/.virtualenvs/RAthena/lib/python3.6/site-packages (from botocore<1.16.0,>=1.15.15->boto3) (2.8.1)
Requirement already satisfied, skipping upgrade: six>=1.5 in /home/rstudio-gavin/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.16.0,>=1.15.15->boto3) (1.14.0)
Installing collected packages: botocore, boto3
Attempting uninstall: botocore
Found existing installation: botocore 1.15.14
Uninstalling botocore-1.15.14:
Successfully uninstalled botocore-1.15.14
Attempting uninstall: boto3
Found existing installation: boto3 1.12.14
Uninstalling boto3-1.12.14:
Successfully uninstalled boto3-1.12.14
Successfully installed boto3-1.12.15 botocore-1.15.15
Installation complete. Please restart R.
I tried restarting r and again:
con <- dbConnect(RAthena::athena())
But I got the same error message. I tried the other suggestions in the error message too. It looks like RAthena works in conjunction with Python. Even though python is installed on my Linux server, I could not get this to work.
Are there any other good packages for pushing objects to s3 in r?