How do I allow a snap to access PYTHONPATH?

I have installed the inkscape snap and have a custom extensions that requires access to some packages outside of the standard library.

How do I provide the inkscape snap access to directories under /usr/lib/python3/?

Hi @timClicks, you generally can’t. Your /usr/lib/python3 isn’t even the path the snap sees - it sees the one from the base snap.

There’s some discussion about this problem inside the snap itself:

But if this is a custom extension altogether, you’ll have to provide all its dependencies somewhere in ~/snap/inkscape/…, as appropriate - and modify the PYTHONPATH.

@timClicks, we can’t get all the libraries, but if there are some that you think would be useful to include in the Inkscape snap please file an issue and let’s talk about it. I’m happy to include generally useful Python libs for extension authors.

But, an issue is better than a forum :smile:

Thanks for taking the time to respond @ted. It looks like lxml is provided these days, so that should be all that I need :slight_smile: