According to the Blender docs you can replace the python installation that comes with blender with your own:
Copy or link the extensions into Blender’s Python subdirectory so Blender can access them, you can also copy the entire Python installation into Blender’s subdirectory, replacing the one Blender comes with. This works as long as the Python versions match and the paths are created in the same relative locations. Doing this has the advantage that you can redistribute this bundle to others with Blender including any extensions you rely on.
I want to use my own virtual environment for Blender, however the problem is, on Windows the python.exe for virtual environments will be placed in
<path/to/venv>/Scripts/python.exe
while Blenders python installation is paced in
<path/to/blender>/python/bin/python.exe
After testing around, simply renaming folders or moving files will mess up activation scripts and links for packages it seems. Question therefore is, if it might be possible to change the paths of the Windows installation for virtual environments?
You can link your bin
as said Scripts
:
mklink /d "C:\path\to\blender\python\bin" "C:\path\to\venv\Scripts"
Naturally you first need to rename or remove (not really recommended) original Scripts
folder