Skip to content

If both Python 2.x and 3.x are available, reticulate prefers Python 2.x despite being deprecated #1547

@s-u

Description

@s-u

On most systems both Python 2.x and 3.x are available as python and python3 respectively, but despite Python 2 being deprecated, reticulate will give it preference to Python 3.x. For example:

> reticulate::py_discover_config()
python:         /usr/bin/python
[...]
NOTE: Python version was forced by PATH

python versions found: 
 /usr/bin/python3
 /usr/bin/python

This is suboptimal since reticulate itself warns that Python 2 is deprecated so it should prefer Python 3.

It requires explicit setting via use_python or RETICULATE_PYTHON in order to force the use of Python 3 (which is the only version that actually works with reticulate since Python 2 will fail with undefined symbols, but that's another story).

Given that the choice is obvious and that reticulate already knows that both Python versions are available (see above) it should pick Python 3 over Python 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions