It's a little tricky to configure python 3 on reticulate, try creating a new virtual environment and using use_virtualenv() function.
library(reticulate)
# You just need to make this step once to create the virtualenv
virtualenv_create("py3-virtualenv", python = "/usr/bin/python3")
use_virtualenv("py3-virtualenv")
> virtualenv_create("py3-virtualenv", python = "/usr/bin/python3")
gives:
Creating virtual environment 'py3-virtualenv' ...
Using python: /usr/bin/python3
New python executable in /home/martin/.virtualenvs/py3-virtualenv/bin/python2
Also creating executable in /home/martin/.virtualenvs/py3-virtualenv/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
**Running virtualenv with interpreter /usr/bin/python2**
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting pip
Using cached https://files.pythonhosted.org/packages/4a/08/6ca123073af4ebc4c5488a5bc8a010ac57aa39ce4d3c8a931ad504de4185/pip-19.3-py2.py3-none-any.whl
Collecting wheel
Using cached https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/6a/9a/50fadfd53ec909e4399b67c74cc7f4e883488035cfcdb90b685758fa8b34/setuptools-41.4.0-py2.py3-none-any.whl
Installing collected packages: pip, wheel, setuptools
Successfully installed pip-19.3 setuptools-41.4.0 wheel-0.33.6
>
I am confused by the line
Running virtualenv with interpreter /usr/bin/python2
and the appropriate deprecation warning.
system("virtualenv -p /usr/bin/python3 /home/martin/.virtualenvs/py3-virtualenv")
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/martin/.virtualenvs/py3-virtualenv/bin/python3
Not overwriting existing python script /home/martin/.virtualenvs/py3-virtualenv/bin/python (you must use /home/martin/.virtualenvs/py3-virtualenv/bin/python3)
Installing setuptools, pkg_resources, pip, wheel...done.
use_virtualenv("py3-virtualenv")