Windows - make nobuild failed - Missing python39, python not found in lib folder

Hi,
It’s my first time building Blender source. There is an add-on in my project associated with Blender which is not supported Blender version 3.0+. So I have to choose blender-v2.93-release to develop.

Use make nobuild 2019 command, and an error occurred:

CMake Error at CMakeLists.txt:1685 (message):
Missing:
“D:/Project/Blender-project/blender/…/lib/win64_vc15/python/39/include/Python.h”

Set the cache entry ‘PYTHON_INCLUDE_DIR’ to point to a valid python include
path. Containing Python.h for python version “3.9”

Use make update command:

[vcvarsall.bat] Environment initialized for: ‘x64’
Compiler Detection successful, detected VS2019
python not found in lib folder

I can find a python folder in /lib/win64_vc15/python, and the python version is 310. I guess maybe blender version 2.93 haven’t support python3.10 yet.
Quicker_20221204_122927

The problem seems very similar to this one Windows - Updating the libraries with make update - python not found in lib folder - not compiling, I tried the solution something like svn clean up, svn update and delete the release folder, but not work for me.

Maybe adding a python 3.9 in /lib/win64_vc15/python can fix this, but how?

Thanks for your patience, your suggestion is very important to me!

You need a matching lib set for older code you can grab the 2.93 libs using

svn co https://svn.blender.org/svnroot/bf-blender/tags/blender-2.93-release/lib/win64_vc15

It worked. After re-downloading the lib set using this URL, now the sources build successfully.

Thank you so much!