Replies: 4 comments 1 reply
-
pyscript runs INSIDE of HomeAssistant. Therefore, it uses the same Python libraries that Home Assistant uses. Where these are located will largely depend on how you run Home Assistant. For me, using the Home Assistant Docker Container, installed libraries are located INSIDE the container at /usr/local/lib/python3.9/site-packages/. |
Beta Was this translation helpful? Give feedback.
-
Thank you, I understand that it runs inside the HA environment. As I mentioned in my post, my /usr/local/lib has no Python stuff in it although you would expect it there. So where is it? echo $PATH produces: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
Beta Was this translation helpful? Give feedback.
-
Have you tried looking at
|
Beta Was this translation helpful? Give feedback.
-
Daniel, that result is already listed in my first post. Have a look... |
Beta Was this translation helpful? Give feedback.
-
I'm having difficulty working my way around the Pyscript environment on Home Assistant.
It's working great, but that's not the issue.
I can import modules, but I can't find them in the files system on my Raspberry Pi setup.
Using Pyscript my Python script installed a module (pip3 install pigpio), and I can import it and use it, but I can't find it.
Here is my sys.path as reported by a Pyscript program using log.info():
[/config/deps/lib/python3.9/site-packages', '/config', '/usr/local/lib/python39.zip', '/usr/local/lib/python3.9', '/usr/local/lib/python3.9/lib-dynload', '/usr/local/lib/python3.9/site-packages', '/usr/src/homeassistant']
/config/deps is empty...
/usr/local/lib only has 5 malloc related files and does not have any Python stuff
/usr/src is empty
I suspect that the reported sys.path is not the one Pyscript uses, so what is it?
Can anybody shed some light on this?
Thanks,
Paul
Beta Was this translation helpful? Give feedback.
All reactions