Skip to content

Change path to Python binary #27

@jannes-m

Description

@jannes-m

Dear reticulate-developers,

thanks for developing such a fantastic package!

Is it possible to change the path to another Python binary after already having run py_config or py_run_string?
In my case I would like to point reticulate to the QGIS Python binary (which is a bit of a hazzle under Windows). This works, i.e. reticulate accepts the QGIS Python binary (mostly to be found under C:\OSGEO4~1\bin\python.exe).

However, before running any RQGIS function I would like to check if the correct Python binary is in use. Assuming, the user has not set up correctly the QGIS Python environment, running py_config might point to another Python binary such as Anaconda Python ("...\AppData\Local\CONTIN1\ANACON1\python.exe). In this case, I would like to change to the QGIS Python binary. I tried use_python but it didn't work. Or is there any other way to find out which Python binary reticulate would use at a specific moment but without actually setting it.

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