Path to Blender Python executable

To get the path to the Python interpreter executable file in Blender, we need to check the “bpy.app.binary_path_python” variable.

However, in Blender 2.93 and later, this variable has been removed from the API, and in order to get the desired path to python executable, we need to refer to the “sys.executable”.

The best way for scripting is to define a function that returns the full path to the python executable for any version of Blender:

And call it when we need:

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments