Wolfram Research

Function Repository Resource:

FindPythonExecutable

Source Notebook

Automatically attempt to find a Python executable on the current machine

Contributed by: Richard Hennigan (Wolfram Research)

ResourceFunction["FindPythonExecutable"][]

searches for a Python executable on the current machine and asks to install it with SystemInstall if not found.

ResourceFunction["FindPythonExecutable"][ExternalSessionObject[]]

gets the executable corresponding to the given Python session.

ResourceFunction["FindPythonExecutable"]["uuid"]

finds a Python executable for the external evaluator corresponding to the given UUID.

Examples

Basic Examples

Find a Python executable on the current system:

In[1]:=
ResourceFunction["FindPythonExecutable"][]
Out[1]=

Get the executable corresponding to an ExternalSessionObject:

In[2]:=
session = StartExternalSession["Python"]
Out[2]=
In[3]:=
ResourceFunction["FindPythonExecutable"][session]
Out[3]=

Use a UUID:

In[4]:=
ResourceFunction[
 "FindPythonExecutable"]["bd9f642c-b3d6-4984-a165-18306797fdb9"]
Out[4]=

Resource History

License Information