ubuntu 20, Blender installed via snap package. default location (i managed to find) is
- /snap/blender/current/2.xx/
I have also installed Prism (VFX pipeline tool) This tool needs PySide2 Package installed in python (shipped with blender). As per forums, i need to copy PySide2 directory inside
- blender/2.xx/python/lib/site-packages
But i am unable to paste that in SNAPPED blender. (right click paste is disabled). I have already tried via root (still failed) 'sudo nautilus' right click paste is also disabled.
Any ideas / suggestions. thanks in advance.
This solution is for Blender users, but the approach might possibly be adapted to other programs with embedded Python consoles.
In Blender's Python Console (not the scripting editor) enter:
the output will include all the folders in which Blender's python searches for python modules when a Blender python import command is executed. In my case this included 10 folders of which all but one was a snap subfolder, hence they were "read only" 'mounted', meaning that even a sudo command could not write/copy to/paste to any of those folders. The exception was the 2nd to last of those folders. It was not a snap subfolder (see my copied result of the print('sys.path') below). I almost missed it, but as soon as I saw it, I brightened up because my strategy was to put the needed Python module (*.py file) in that folder. I first used PIP to install that needed python module into my System's (non-Blender) python module area (which is not snap-protected) and then copied it from there to the /home/vic/.config/blender/2.92/scripts/addons/modules folder (I had to create the last three levels of this folder path). At first it didnt' work, but after closing Blender and restarting, Blender's Python found the needed, but previously absent python module.
I hope this helps others, as it took me quite a while to get past that hurdle. I expect there are benefits to snap's security approach of making all those sub-directories unwritable, but I am glad someone was smart enough to allow at least one back door for installing additional python modules in the case of Blender’s embedded Python environment.