flathub / org.blender.Blender

https://flathub.org/apps/details/org.blender.Blender
19 stars 26 forks source link

Cannot install Python packages due to read-only file system #188

Open yar2001 opened 1 month ago

yar2001 commented 1 month ago

Hi, I'm using an add-on that requires the pillow package. However, when I try to install the package, it throws:

ERROR: Could not install packages due to an OSError: [Errno 30] Read-only file system: '/app/blender/4.2/python/lib/python3.11/site-packages/pillow.libs'

Here is the python script I used to install the package:

import pip
pip.main(['install','pillow'])

It seems that the flatpak sandboxed environment is the cause of the problem. Is it possible to solve the problem? Thanks!

kevinsmia1939 commented 1 month ago

Not sure how to install Python package from the python console inside Blender. But I have use something like,

flatpak --command=bash run org.blender.Blender python3 -mpip install pillow

However, the current build of Blender flatpak does not have pip install. We could do that by changing the manifest from,

"runtime": "org.freedesktop.Platform", to "runtime": "org.freedesktop.Sdk", Other maintainers should let us know what they think about that.