There is now a python executable in the blender install folder, It's clearly said that it was included for subprocesses purposes (here : https://developer.blender.org/T43486)
But how can we access it through scripts ?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
The path to access this is
The exact details on how you should run the process are up to you, and not Blender spesific.
Best try the
subprocess module, but
os.system will work too.
Heres a very simple example calling a Python sub-process.
import bpy import subprocess import time command = ( bpy.app.binary_path_python, "-c", "import time; time.sleep(2)", ) proc = subprocess.Popen(command) while proc.poll() is None: print("Waiting...") time.sleep(0.1) print("Finished with exit code %d" % proc.returncode)
For an example of how to run Python as a subprocess without locking up Blender, see this Q & A.