Closed ninetyfive666 closed 1 month ago
Just a quick reply from phone: you are using blender installed in global location c:\Program Files\Blender Foundation
This means that you blender is most likely installed with admin privileges and it can not be modified by normal user. And installing debugpy is a modification that you are trying to make.
The easiest fix is to download portable version of blender and use that for development
I'm having the same issue, also with another addon's dependency,
Previously I used to install addons dependencies using subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'debugpy']) inside of blender
but in 4.2, I call it, and it returns: requirements already satisfied but modules are never found when Imported in blender
The easiest fix is to download portable version of blender and use that for development
is there another way to make the normal blender installation use the user's installed packages ?
I'm having issues even with a portable version, i'm getting issues with create_link_in_user_addon_directory
, and with access denied to \\AppData\\Roaming\\Blender Foundation\\Blender\\4.2\\scripts\\addons\\[add-on name]
, despite it being a portable installation
I was able to get the extension working with Blender 4.2 on Windows 11. Here's what I did:
cd "C:\Program Files\Blender Foundation\Blender 4.2\4.2\python\bin"
sudo ./python.exe -m pip install --force debugpy flask requests
Two important notes:
pip install
without admin privileges and it defaulted to user installations of the modules (placing them in %USERPROFILE%\AppData\Roaming\Python\Python311\site-packages\
which is not in the Blender's Python path). Because of this, I had to follow up with a pip install --force
to reinstall them in the correct location.sudo
is with gsudo, however, you can achieve the same effect with an administrator shell.I was able to get the extension working with Blender 4.2 on Windows 11. Here's what I did:
cd "C:\Program Files\Blender Foundation\Blender 4.2\4.2\python\bin" sudo ./python.exe -m pip install --force debugpy flask requests
Thanks, this worked from CMD admin shell, and Worked from inside blender running as administrator
I'm guessing addons will have to be self contained or use wheels for packaging, as per the new extensions documentation
summing up: vs code tried to install pip packages and it does not have rights to do that. This is known issue.
I tried installing everything manually, the version of pip i have installed is actually 24.1.2. It seems this addon uses a different environment? Anyway i cant launch blender 4.2 LTS, the older versions like 3.6.12 work fine.