SNAP installation and PYTHONPATH

Hello.

I have Ubuntu and home-assistant-snap installation (last version downloaded form Ubuntu Software)
Unfortunately this version contains broadlink python module that my hardware does not support.
I create ticket on github and now dev. version support my broadlink power switch.
But I cannot install new version of broadlink module to my HA installation.

When I run shell from snap:
sudo snap run --shell home-assistant-snap

and look to python list folder

python -c ‘import sys; print(sys.path)’

in snap contains read-write folder only on 5 place, but on 4 place we have a folder with old module version:

[’’, ‘/usr/lib/python38.zip’,
‘/usr/lib/python3.8’,
‘/usr/lib/python3.8/lib-dynload’,
'/snap/home-assistant-snap/237/lib/python3.8/site-packages’,
’/root/snap/home-assistant-snap/237/.local/lib/python3.8/site-packages/‘,
‘/usr/lib/python3/dist-packages’]

when in snap shell

I run command Command:
export PYTHONPATH=’/root/snap/home-assistant-snap/237/.local/lib/python3.8/site-packages/’
this folder move to first place and python choose new module for import

But how I can change this settings without reinstall Home Assistant in non Snap mode?

Solution:

add PYTHONPATH=’/root/snap/home-assistant-snap/237/.local/lib/python3.8/site-packages/’ to /etc/environment