Hello,
I have an application where the snap application itself should install pypi packages depending on what component the user wants to install. However I keep getting the error:
ERROR: Could not install packages due to an EnvironmentError: [Errno 30] Read-only file system: ‘/snap/snap_name/x1/usr/lib/python3.8/site-packages/package_name’
I looked at using the interfaces system-files
, content
and layouts
and tried both system-files
and content
but I don’t think that this is what they are ment to do. Not really sure how it could work with layouts.
One way of doing it could be to install the packages in $SNAP_USER_COMMON
or the like and then add that to the PYTHONPATH
variable. Only problem is that it is an open source software with a rather large code base so changing the default installation path to for example $SNAP_USER_DATA
could be troublesome.
The easiest way would probably be to give permission to the application to install site-packages in the python directory but I don’t know how to do that.
Any help would be much appreciated!