SNAP installation and PYTHONPATH


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/’,

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?


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