pyscript Installation Problem #250
Replies: 5 comments 4 replies
-
Why not install HACS first? Since you're new, it's probably easier. Try to find out how to install HACS (Home assistant community store) |
Beta Was this translation helpful? Give feedback.
-
Appdaemon is a great system as well. Two very different approaches. Appdaemon is class based, and lives outside of Home Assistant, therefore, it can only do things the Home Assistant Websocket allows. Pyscript is more decorator based, and it lives inside of Home Assistant with full access to HASS internals. In most cases, however, you can do the same things with either one. |
Beta Was this translation helpful? Give feedback.
-
Did you ever fix this? I am facing the same problem as you and I have taken the exact steps as you too. |
Beta Was this translation helpful? Give feedback.
-
Just install hacs, then install pyscript through hacs. |
Beta Was this translation helpful? Give feedback.
-
I have (just a few weeks ago) installed pyscript (not pyscripts) via HACS and i must say it works just perfect. |
Beta Was this translation helpful? Give feedback.
-
Hi, I am quite new working with Home Assistant, installed on an Pi4.
I wanted to use a Python script that uses the math library. As far as I understand, this is only possible with the HACS extension pyscript. When trying to install I have the following problem:
I tried to do like described here https://hacs-pyscript.readthedocs.io/en/stable/installation.html
Option 1 didn't work cause pyscript could not be found
Option 2 seemd to work at first but so fardid not!
The directotry config/custom_components already existed. hacs is in there.
I made the folder config/custom_components/pyscript and unzipped hass-custom-pyscript.zip in there.
By the way, I skipped to install the Jupyter kernel cause it is optional and I do not have a clue what it is yet.
Configuration via UI did not work because I could not find Pyscript Python scripting under Configuration/Integration neither under HACS/Integrations.
I choose the alternative adding pyscript: to /configuration.yaml with both parameters as told.
Next I created the folder config/pyscript and moved my script dew_point.py (uses math) from folder python_scripts in there. Conviguration validation was ok so I restarted HASS.
Now these script can not be called under Developer Tools Services so far.
Located in folder python_scripts it can but produces following LOG entry
Logger: homeassistant.components.python_script.dew_point.py
Source: components/python_script/init.py:222
Integration: Python Scripts (documentation, issues)
First occurred: 6:41:23 AM (1 occurrences)
Last logged: 6:41:23 AM
Error executing script: import not found
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/python_script/init.py", line 222, in execute
exec(compiled.code, restricted_globals)
File "dew_point.py", line 12, in
ImportError: import not found
Now I am wondering why I install pyscript in folder config/custom_components/pyscript and add pyscript: to my /configuration.yaml. Anyway I tried to unzip hass-custom-pyscript.zip in config/pyscript, did not work.
I tried to add custom_components/pyscript: (exactly like this) to my /configuration.yaml ending up that the Conviguration validation was not ok so I decided not to restart HASS.
Can anybody help me with that?
Thanks a lot already, Thomas
Beta Was this translation helpful? Give feedback.
All reactions