I'm trying to set up VSCode with Pylance and bpy for the purpose of making a Blender plugin, since I have very little knowledge of Python I think LSP support would help quite a bit.
I have cloned blender's git repo and ran make update and make bpy and gotten a bpy directory containing the __init__.pyd file, opened it dependencies and it was missing python311.dll and COMCTL32.dll says "missing imports". I fixed the python311 issue by installing that version of python but don't know what to do about the COMCTL32.dll file or if I'm even on the right track.
relevant VSCode settings:
"python.languageServer": "Pylance",
"python.analysis.extraPaths": [
"C:/SDK/build_windows_Bpy_x64_vc17_Release/bin/Release"
],
"python.envFile": "${workspaceFolder}/.env",
"python.analysis.autoSearchPaths": true,
"python.defaultInterpreterPath": "C:\\Users\\david\\AppData\\Local\\Programs\\Python\\Python311\\python.exe",
Loading the __init__.pyd file in Dependencies:

I'm not sure if this issue will stop Pylance from loading bpy, it seems to see the bpy module but none of it's members. Uncommenting the first 2 lines doesn't seem to make any difference.

Pylance output:
2025-05-12 23:06:39.664 [info] [Info - 11:06:39 PM] (33104) Server root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist
2025-05-12 23:06:39.668 [info] [Info - 11:06:39 PM] (33104) Pylance language server 2025.4.1 (pyright version 1.1.398, commit 4f24eccc) starting
2025-05-12 23:06:39.672 [info] [Info - 11:06:39 PM] (33104) Starting service instance "vkf" for workspace "c:\SDK\vkf"
2025-05-12 23:06:39.733 [info] [Info - 11:06:39 PM] (33104) Setting environmentName for service "vkf": "3.11.9 (global)"
2025-05-12 23:06:39.734 [info] [Info - 11:06:39 PM] (33104) Setting pythonPath for service "vkf": "C:\Users\david\AppData\Local\Programs\Python\Python311\python.exe"
2025-05-12 23:06:39.734 [info] [Info - 11:06:39 PM] (33104) No include entries specified; assuming c:\SDK\vkf
2025-05-12 23:06:39.735 [info] [Info - 11:06:39 PM] (33104) Auto-excluding **/node_modules
2025-05-12 23:06:39.735 [info] [Info - 11:06:39 PM] (33104) Auto-excluding **/__pycache__
2025-05-12 23:06:39.735 [info] [Info - 11:06:39 PM] (33104) Auto-excluding **/.*
2025-05-12 23:06:39.796 [info] [Info - 11:06:39 PM] (33104) Assuming Python version 3.11.9.final.0
2025-05-12 23:06:41.047 [info] [Info - 11:06:41 PM] (33104) Found 2 source files
2025-05-12 23:06:41.064 [info] [Info - 11:06:41 PM] (33104) BG: Priority queue background worker(2) root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist
2025-05-12 23:06:41.064 [info] [Info - 11:06:41 PM] (33104) BG: Priority queue background worker(2) started
2025-05-12 23:06:41.066 [info] [Info - 11:06:41 PM] (33104) Setting environmentName for service "vkf": "3.11.9 (global)"
2025-05-12 23:06:41.067 [info] [Info - 11:06:41 PM] (33104) Setting pythonPath for service "vkf": "C:\Users\david\AppData\Local\Programs\Python\Python311\python.exe"
2025-05-12 23:06:41.067 [info] [Info - 11:06:41 PM] (33104) No include entries specified; assuming c:\SDK\vkf
2025-05-12 23:06:41.067 [info] [Info - 11:06:41 PM] (33104) Auto-excluding **/node_modules
2025-05-12 23:06:41.067 [info] [Info - 11:06:41 PM] (33104) Auto-excluding **/__pycache__
2025-05-12 23:06:41.067 [info] [Info - 11:06:41 PM] (33104) Auto-excluding **/.*
2025-05-12 23:06:41.112 [info] [Info - 11:06:41 PM] (33104) Assuming Python version 3.11.9.final.0
2025-05-12 23:06:42.062 [info] [Info - 11:06:42 PM] (33104) Found 2 source files
2025-05-12 23:06:42.553 [info] [Info - 11:06:42 PM] (33104) BG: Indexer background runner(3) root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist (index)
2025-05-12 23:06:42.553 [info] [Info - 11:06:42 PM] (33104) BG: Indexing(3) started
2025-05-12 23:06:43.111 [info] [Info - 11:06:43 PM] (33104) BG: scanned(3) 16 files over 1 exec env
2025-05-12 23:06:43.195 [info] [Info - 11:06:43 PM] (33104) BG: indexed(3) 16 files over 1 exec env
2025-05-12 23:06:43.205 [info] [Info - 11:06:43 PM] (33104) BG: Indexing finished(3).
2025-05-12 23:07:58.119 [info] [Info - 11:07:58 PM] (33104) Setting environmentName for service "vkf": "3.11.9 (global)"
2025-05-12 23:07:58.119 [info] [Info - 11:07:58 PM] (33104) Setting pythonPath for service "vkf": "C:\Users\david\AppData\Local\Programs\Python\Python311\python.exe"
2025-05-12 23:07:58.119 [info] [Info - 11:07:58 PM] (33104) No include entries specified; assuming c:\SDK\vkf
2025-05-12 23:07:58.120 [info] [Info - 11:07:58 PM] (33104) Auto-excluding **/node_modules
2025-05-12 23:07:58.120 [info] [Info - 11:07:58 PM] (33104) Auto-excluding **/__pycache__
2025-05-12 23:07:58.120 [info] [Info - 11:07:58 PM] (33104) Auto-excluding **/.*
2025-05-12 23:07:58.163 [info] [Info - 11:07:58 PM] (33104) Assuming Python version 3.11.9.final.0
2025-05-12 23:07:59.141 [info] [Info - 11:07:59 PM] (33104) Found 2 source files
2025-05-12 23:07:59.175 [info] [Info - 11:07:59 PM] (33104) Setting environmentName for service "vkf": "3.11.9 (global)"
2025-05-12 23:07:59.175 [info] [Info - 11:07:59 PM] (33104) Setting pythonPath for service "vkf": "C:\Users\david\AppData\Local\Programs\Python\Python311\python.exe"
2025-05-12 23:07:59.175 [info] [Info - 11:07:59 PM] (33104) No include entries specified; assuming c:\SDK\vkf
2025-05-12 23:07:59.176 [info] [Info - 11:07:59 PM] (33104) Auto-excluding **/node_modules
2025-05-12 23:07:59.176 [info] [Info - 11:07:59 PM] (33104) Auto-excluding **/__pycache__
2025-05-12 23:07:59.176 [info] [Info - 11:07:59 PM] (33104) Auto-excluding **/.*
2025-05-12 23:07:59.222 [info] [Info - 11:07:59 PM] (33104) Assuming Python version 3.11.9.final.0
2025-05-12 23:08:00.203 [info] [Info - 11:08:00 PM] (33104) Found 2 source files
2025-05-12 23:08:00.211 [info] [Info - 11:08:00 PM] (33104) BG: Indexer background runner(4) root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist (index)
2025-05-12 23:08:00.211 [info] [Info - 11:08:00 PM] (33104) BG: Indexing(4) started
2025-05-12 23:08:00.211 [info] [Info - 11:08:00 PM] (33104) BG: scanned(4) 16 files over 1 exec env
2025-05-12 23:08:00.434 [info] [Info - 11:08:00 PM] (33104) BG: scanned(4) 16 files over 1 exec env
2025-05-12 23:08:00.517 [info] [Info - 11:08:00 PM] (33104) BG: indexed(4) 16 files over 1 exec env
2025-05-12 23:08:00.525 [info] [Info - 11:08:00 PM] (33104) BG: Indexing finished(4).
2025-05-12 23:08:03.848 [info] [Info - 11:08:03 PM] (18636) Server root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist
2025-05-12 23:08:03.851 [info] [Info - 11:08:03 PM] (18636) Pylance language server 2025.4.1 (pyright version 1.1.398, commit 4f24eccc) starting
2025-05-12 23:08:03.852 [info] [Info - 11:08:03 PM] (18636) Starting service instance "vkf" for workspace "c:\SDK\vkf"
2025-05-12 23:08:03.901 [info] [Info - 11:08:03 PM] (18636) Setting environmentName for service "vkf": "3.11.9 (global)"
2025-05-12 23:08:03.901 [info] [Info - 11:08:03 PM] (18636) Setting pythonPath for service "vkf": "C:\Users\david\AppData\Local\Programs\Python\Python311\python.exe"
2025-05-12 23:08:03.902 [info] [Info - 11:08:03 PM] (18636) No include entries specified; assuming c:\SDK\vkf
2025-05-12 23:08:03.902 [info] [Info - 11:08:03 PM] (18636) Auto-excluding **/node_modules
2025-05-12 23:08:03.902 [info] [Info - 11:08:03 PM] (18636) Auto-excluding **/__pycache__
2025-05-12 23:08:03.902 [info] [Info - 11:08:03 PM] (18636) Auto-excluding **/.*
2025-05-12 23:08:03.951 [info] [Info - 11:08:03 PM] (18636) Assuming Python version 3.11.9.final.0
2025-05-12 23:08:05.105 [info] [Info - 11:08:05 PM] (18636) Found 2 source files
2025-05-12 23:08:05.121 [info] [Info - 11:08:05 PM] (18636) BG: Priority queue background worker(2) root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist
2025-05-12 23:08:05.122 [info] [Info - 11:08:05 PM] (18636) BG: Priority queue background worker(2) started
2025-05-12 23:08:05.124 [info] [Info - 11:08:05 PM] (18636) Setting environmentName for service "vkf": "3.11.9 (global)"
2025-05-12 23:08:05.124 [info] [Info - 11:08:05 PM] (18636) Setting pythonPath for service "vkf": "C:\Users\david\AppData\Local\Programs\Python\Python311\python.exe"
2025-05-12 23:08:05.125 [info] [Info - 11:08:05 PM] (18636) No include entries specified; assuming c:\SDK\vkf
2025-05-12 23:08:05.125 [info] [Info - 11:08:05 PM] (18636) Auto-excluding **/node_modules
2025-05-12 23:08:05.125 [info] [Info - 11:08:05 PM] (18636) Auto-excluding **/__pycache__
2025-05-12 23:08:05.125 [info] [Info - 11:08:05 PM] (18636) Auto-excluding **/.*
2025-05-12 23:08:05.167 [info] [Info - 11:08:05 PM] (18636) Assuming Python version 3.11.9.final.0
2025-05-12 23:08:06.109 [info] [Info - 11:08:06 PM] (18636) Found 2 source files
2025-05-12 23:08:06.569 [info] [Info - 11:08:06 PM] (18636) BG: Indexer background runner(3) root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist (index)
2025-05-12 23:08:06.569 [info] [Info - 11:08:06 PM] (18636) BG: Indexing(3) started
2025-05-12 23:08:07.190 [info] [Info - 11:08:07 PM] (18636) BG: scanned(3) 16 files over 1 exec env
2025-05-12 23:08:07.293 [info] [Info - 11:08:07 PM] (18636) BG: indexed(3) 16 files over 1 exec env
2025-05-12 23:08:07.302 [info] [Info - 11:08:07 PM] (18636) BG: Indexing finished(3).
2025-05-12 23:08:13.569 [info] (Client) The existing extension didn't exit within 10 seconds. New instance will start, but you might encounter issues.
2025-05-12 23:08:13.569 [info] (Client) Pylance async client (2025.4.1) started with python extension (2025.6.0)
2025-05-12 23:08:15.780 [info] [Info - 11:08:15 PM] (18636) Setting environmentName for service "vkf": "3.11.9 (global)"
2025-05-12 23:08:15.781 [info] [Info - 11:08:15 PM] (18636) Setting pythonPath for service "vkf": "C:\Users\david\AppData\Local\Programs\Python\Python311\python.exe"
2025-05-12 23:08:15.781 [info] [Info - 11:08:15 PM] (18636) No include entries specified; assuming c:\SDK\vkf
2025-05-12 23:08:15.781 [info] [Info - 11:08:15 PM] (18636) Auto-excluding **/node_modules
2025-05-12 23:08:15.781 [info] [Info - 11:08:15 PM] (18636) Auto-excluding **/__pycache__
2025-05-12 23:08:15.781 [info] [Info - 11:08:15 PM] (18636) Auto-excluding **/.*
2025-05-12 23:08:15.835 [info] [Info - 11:08:15 PM] (18636) Assuming Python version 3.11.9.final.0
2025-05-12 23:08:16.850 [info] [Info - 11:08:16 PM] (18636) Found 2 source files
2025-05-12 23:08:16.877 [info] [Info - 11:08:16 PM] (18636) Setting environmentName for service "vkf": "3.11.9 (global)"
2025-05-12 23:08:16.877 [info] [Info - 11:08:16 PM] (18636) Setting pythonPath for service "vkf": "C:\Users\david\AppData\Local\Programs\Python\Python311\python.exe"
2025-05-12 23:08:16.877 [info] [Info - 11:08:16 PM] (18636) No include entries specified; assuming c:\SDK\vkf
2025-05-12 23:08:16.877 [info] [Info - 11:08:16 PM] (18636) Auto-excluding **/node_modules
2025-05-12 23:08:16.877 [info] [Info - 11:08:16 PM] (18636) Auto-excluding **/__pycache__
2025-05-12 23:08:16.877 [info] [Info - 11:08:16 PM] (18636) Auto-excluding **/.*
2025-05-12 23:08:16.923 [info] [Info - 11:08:16 PM] (18636) Assuming Python version 3.11.9.final.0
2025-05-12 23:08:17.919 [info] [Info - 11:08:17 PM] (18636) Found 2 source files
2025-05-12 23:08:17.928 [info] [Info - 11:08:17 PM] (18636) BG: Indexer background runner(4) root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist (index)
2025-05-12 23:08:17.929 [info] [Info - 11:08:17 PM] (18636) BG: Indexing(4) started
2025-05-12 23:08:17.929 [info] [Info - 11:08:17 PM] (18636) BG: scanned(4) 16 files over 1 exec env
2025-05-12 23:08:18.146 [info] [Info - 11:08:18 PM] (18636) BG: scanned(4) 16 files over 1 exec env
2025-05-12 23:08:18.230 [info] [Info - 11:08:18 PM] (18636) BG: indexed(4) 16 files over 1 exec env
2025-05-12 23:08:18.237 [info] [Info - 11:08:18 PM] (18636) BG: Indexing finished(4).
2025-05-12 23:11:53.501 [info] [Info - 11:11:53 PM] (18636) BG: Indexer background runner(5) root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist (refresh)
2025-05-12 23:11:53.501 [info] [Info - 11:11:53 PM] (18636) BG: Indexing(5) started
2025-05-12 23:11:54.152 [info] [Info - 11:11:54 PM] (18636) BG: scanned(5) 16 files over 1 exec env
2025-05-12 23:11:54.271 [info] [Info - 11:11:54 PM] (18636) BG: indexed(5) 16 files over 1 exec env
2025-05-12 23:11:54.284 [info] [Info - 11:11:54 PM] (18636) BG: Indexing finished(5).
2025-05-12 23:51:58.877 [info] [Info - 11:51:58 PM] (27604) Server root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist
2025-05-12 23:51:58.885 [info] [Info - 11:51:58 PM] (27604) Pylance language server 2025.4.1 (pyright version 1.1.398, commit 4f24eccc) starting
2025-05-12 23:51:58.888 [info] [Info - 11:51:58 PM] (27604) Starting service instance "vkf" for workspace "c:\SDK\vkf"
2025-05-12 23:51:58.898 [info] (Client) Pylance async client (2025.4.1) started with python extension (2025.6.0)
2025-05-12 23:51:58.927 [info] [Info - 11:51:58 PM] (27604) Setting environmentName for service "vkf": "3.11.9 (global)"
2025-05-12 23:51:58.927 [info] [Info - 11:51:58 PM] (27604) Setting pythonPath for service "vkf": "C:\Users\david\AppData\Local\Programs\Python\Python311\python.exe"
2025-05-12 23:51:58.928 [info] [Info - 11:51:58 PM] (27604) No include entries specified; assuming c:\SDK\vkf
2025-05-12 23:51:58.928 [info] [Info - 11:51:58 PM] (27604) Auto-excluding **/node_modules
2025-05-12 23:51:58.928 [info] [Info - 11:51:58 PM] (27604) Auto-excluding **/__pycache__
2025-05-12 23:51:58.928 [info] [Info - 11:51:58 PM] (27604) Auto-excluding **/.*
2025-05-12 23:51:58.984 [info] [Info - 11:51:58 PM] (27604) Assuming Python version 3.11.9.final.0
2025-05-12 23:52:00.171 [info] [Info - 11:52:00 PM] (27604) Found 2 source files
2025-05-12 23:52:00.186 [info] [Info - 11:52:00 PM] (27604) BG: Priority queue background worker(2) root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist
2025-05-12 23:52:00.186 [info] [Info - 11:52:00 PM] (27604) BG: Priority queue background worker(2) started
2025-05-12 23:52:00.189 [info] [Info - 11:52:00 PM] (27604) Setting environmentName for service "vkf": "3.11.9 (global)"
2025-05-12 23:52:00.189 [info] [Info - 11:52:00 PM] (27604) Setting pythonPath for service "vkf": "C:\Users\david\AppData\Local\Programs\Python\Python311\python.exe"
2025-05-12 23:52:00.189 [info] [Info - 11:52:00 PM] (27604) No include entries specified; assuming c:\SDK\vkf
2025-05-12 23:52:00.189 [info] [Info - 11:52:00 PM] (27604) Auto-excluding **/node_modules
2025-05-12 23:52:00.189 [info] [Info - 11:52:00 PM] (27604) Auto-excluding **/__pycache__
2025-05-12 23:52:00.189 [info] [Info - 11:52:00 PM] (27604) Auto-excluding **/.*
2025-05-12 23:52:00.233 [info] [Info - 11:52:00 PM] (27604) Assuming Python version 3.11.9.final.0
2025-05-12 23:52:01.167 [info] [Info - 11:52:01 PM] (27604) Found 2 source files
2025-05-12 23:52:01.666 [info] [Info - 11:52:01 PM] (27604) BG: Indexer background runner(3) root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist (index)
2025-05-12 23:52:01.666 [info] [Info - 11:52:01 PM] (27604) BG: Indexing(3) started
2025-05-12 23:52:02.235 [info] [Info - 11:52:02 PM] (27604) BG: scanned(3) 16 files over 1 exec env
2025-05-12 23:52:02.330 [info] [Info - 11:52:02 PM] (27604) BG: indexed(3) 16 files over 1 exec env
2025-05-12 23:52:02.340 [info] [Info - 11:52:02 PM] (27604) BG: Indexing finished(3).
2025-05-12 23:55:18.945 [info] [Info - 11:55:18 PM] (1740) Server root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist
2025-05-12 23:55:18.946 [info] [Info - 11:55:18 PM] (1740) Pylance language server 2025.4.1 (pyright version 1.1.398, commit 4f24eccc) starting
2025-05-12 23:55:18.950 [info] [Info - 11:55:18 PM] (1740) Starting service instance "vkf" for workspace "c:\SDK\vkf"
2025-05-12 23:55:19.003 [info] [Info - 11:55:19 PM] (1740) Setting environmentName for service "vkf": "3.11.9 (global)"
2025-05-12 23:55:19.004 [info] [Info - 11:55:19 PM] (1740) Setting pythonPath for service "vkf": "C:\Users\david\AppData\Local\Programs\Python\Python311\python.exe"
2025-05-12 23:55:19.004 [info] [Info - 11:55:19 PM] (1740) No include entries specified; assuming c:\SDK\vkf
2025-05-12 23:55:19.004 [info] [Info - 11:55:19 PM] (1740) Auto-excluding **/node_modules
2025-05-12 23:55:19.005 [info] [Info - 11:55:19 PM] (1740) Auto-excluding **/__pycache__
2025-05-12 23:55:19.005 [info] [Info - 11:55:19 PM] (1740) Auto-excluding **/.*
2025-05-12 23:55:19.052 [info] [Info - 11:55:19 PM] (1740) Assuming Python version 3.11.9.final.0
2025-05-12 23:55:20.187 [info] [Info - 11:55:20 PM] (1740) Found 2 source files
2025-05-12 23:55:20.201 [info] [Info - 11:55:20 PM] (1740) BG: Priority queue background worker(2) root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist
2025-05-12 23:55:20.202 [info] [Info - 11:55:20 PM] (1740) BG: Priority queue background worker(2) started
2025-05-12 23:55:20.204 [info] [Info - 11:55:20 PM] (1740) Setting environmentName for service "vkf": "3.11.9 (global)"
2025-05-12 23:55:20.204 [info] [Info - 11:55:20 PM] (1740) Setting pythonPath for service "vkf": "C:\Users\david\AppData\Local\Programs\Python\Python311\python.exe"
2025-05-12 23:55:20.204 [info] [Info - 11:55:20 PM] (1740) No include entries specified; assuming c:\SDK\vkf
2025-05-12 23:55:20.205 [info] [Info - 11:55:20 PM] (1740) Auto-excluding **/node_modules
2025-05-12 23:55:20.205 [info] [Info - 11:55:20 PM] (1740) Auto-excluding **/__pycache__
2025-05-12 23:55:20.205 [info] [Info - 11:55:20 PM] (1740) Auto-excluding **/.*
2025-05-12 23:55:20.246 [info] [Info - 11:55:20 PM] (1740) Assuming Python version 3.11.9.final.0
2025-05-12 23:55:21.193 [info] [Info - 11:55:21 PM] (1740) Found 2 source files
2025-05-12 23:55:21.647 [info] [Info - 11:55:21 PM] (1740) BG: Indexer background runner(3) root directory: file:///c%3A/Users/david/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist (index)
2025-05-12 23:55:21.647 [info] [Info - 11:55:21 PM] (1740) BG: Indexing(3) started
2025-05-12 23:55:22.241 [info] [Info - 11:55:22 PM] (1740) BG: scanned(3) 16 files over 1 exec env
2025-05-12 23:55:22.301 [info] [Info - 11:55:22 PM] (1740) BG: indexed(3) 16 files over 1 exec env
2025-05-12 23:55:22.312 [info] [Info - 11:55:22 PM] (1740) BG: Indexing finished(3).
Test script:
import sys
sys.path.insert(0, r"C:\\SDK\\build_windows_Bpy_x64_vc17_Release\\bin\\Release")
import bpy
print("version: " + str(bpy.app.version))
Output:
C:\SDK\vkf>C:/Users/david/AppData/Local/Programs/Python/Python311/python.exe c:/SDK/vkf/python_test.py
ModuleNotFoundError: No module named 'numpy'
Unable to initialise audio
ImportError: numpy.core.multiarray failed to import
version: (4, 5, 0)
Does anyone know how to get this to work?
from package.submodule import xyis not recognized the LSP it often helps if you do aimport package.submodulefirst. Blender's python ships with numpy, but your local python does not. You have to install it in your environment first. Executepip install numpywith thepipprogramm in your python path.