Thank you, Andres!
The commandyou suggested
> 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.
> use_virtualenv("py3-virtualenv")
runs smoothly.
However in a new R-session, I get
> library(reticulate)
> use_virtualenv("py3-virtualenv")
> py_discover_config()
python: /home/martin/.virtualenvs/r-reticulate/bin/python
libpython: [NOT FOUND]
pythonhome: /usr/local:/usr/local
version: 3.7.4 (default, Oct 12 2019, 20:46:47) [GCC 5.4.0 20160609]
numpy: /home/martin/.virtualenvs/r-reticulate/lib/python3.7/site-packages/numpy
numpy_version: 1.17.2
python versions found:
/home/martin/.virtualenvs/py3-virtualenv/bin/python
/home/martin/.virtualenvs/r-reticulate/bin/python
/usr/bin/python
/usr/bin/python3
> py_available()
[1] FALSE
It could be my fault because
in /usr/bin, I have
lrwxrwxrwx 1 root root 24 Oct 14 09:10 python -> /usr/local/bin/python3.7
but
lrwxrwxrwx 1 root root 16 Nov 24 2017 python-config -> python2.7-config
From the terminal prompt I do get
/usr/bin$ python
Python 3.7.4 (default, Oct 12 2019, 20:46:47)
[GCC 5.4.0 20160609] on linux
What is the gospel about naming and links?