I tried to make my blender use python3.6 and it worked on version v2.79.I think it might also work on other version of python and blender.
Steps are listed below:
- open the blender program folder, you can see the "python3x.dll" in the directory.(in my case, it's "python35.dll")
- open blender.exe as text file (I used notepad++),and find the "python3x.dll",replace it by "python36.dll"
- copy a python36.dll into the main directory.(python36.dll can be found where you installed python36)
go to the python directory under blender.(in my case: "blender\2.79\python"),backup the "bin" and "lib" foldes, then make link to your python36 directories for them respectively by input below two commands in the administrator command prompt.
mklink /j bin "C:\Program Files\Python36"
mklink /j lib "C:\Program Files\Python36\Lib"
The python36 folders here should be changed to match yours.
Now, it may work in many situations.
Addition: I find the "import _ctypes" maybe failed. It seems this method can't link python to it's dll directory.
import sys
sys.path.append('C:\Program Files\Python36\DLLs')
Put the codes at the head of the first python script which will get around the problem.
python
folder in blender path tree. This will make any 3rd party modules available from system available from blender without having to alter paths etc. Haven't tried 3.7 can attest that 2.8 builds fine for me using my python system version 3.66. on ubuntu 18 Unfortunately questions about building blender are off-topic. $\endgroup$