How to use my own Python installation?

I would like to install Python myself in a custom path and let Blender run that one instead of the embedded. Instead of using the default installation folder in C:\ I would like to use a different path like C:\Development\

  1. As far as I see in a video, a user simply installed Python (in the default location) and Blender recognized it automatically. Is this basically how it’s done?
    https://www.youtube.com/watch?v=IH8GJrK05Lk

  2. Another user said that he deleted the python distribution of Blender, to enforce it use the system Python instead. Is this a safe approach or it might be dangerous?
    (Now I can’t find the link but I hope you heard of this).

  3. Here it is said that simply changing the PATH variable on Windows is all it takes to change the default Python installation. I guess that might also be the same for the PYTHON_HOME variable as well. Will this help setting my own custom installation path?
    https://www.iram.fr/IRAMFR/GILDAS/doc/html/gildas-python-html/node36.html

The funny thing is that I tried these things and nothing worked. How you can do it?

Blender (on windows) will first look in its own 2.7x subdirectory for a folder called Python, if you renamed that folder to _Python it will look on your system via whatever paths you may have configured. Your local Python version will need to be 3.4 though

I found it most convenient to let Python install itself to a default C:\PythonXX (where XX is 27, 33 or 34 etc) directory each time, and use the installer to set the path.

“Nothing worked” ? perhaps start blender from a console / command line and look at the error message?

Hi, thanks a lot for the response, I hope that we might find what is going on.

I have installed Python in this location:
C:\Programs\Python34\python.exe

I don’t know if this this important, but also the installation path is in the “PATH” environment variable, for the record, I can type “python” in command prompt and the interactive session starts.

Now in the Blender folder I have renamed the “python” folder as you suggested and then Blender crashes right at the starting, it says: “Warning: bundled python not found and is expected on this platform…”

I post again with the solution.

A correction, in the previous post the console wrote that it could not find the “encoding” library, so that made me thing that it could not locate the libraries of Python, so I added the the …\Python34\Lib to PYTHONPATH and Blender worked. Now I have set only the PYTHONHOME same as the Python installation because it’s practically the same.

I don’t know exactly what happened previously, I don’t remember exactly, but I think that I used PYTHONHOME for the …\Python34\Lib or the opposite.

However it’s good now that it works, in case everyone is interested to know here’s the solution. :slight_smile: