Hello, I’m trying to use a component that require Pycurl >= 7 (I’m using hassbian), but I’ve always error because HA doesn’t see pycurl. I tried to install it from pip3 (logged in ssh as homeassistant) and from apt-get (python3-pycurl, logged in ssh as pi), always this error. Anyone could help me?
p.s. the custom components I’m trying to use is this one (Dahua event by SaWey)
Error loading custom_components.dahua_event. Make sure all dependencies are installed
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/loader.py”, line 142, in get_component
module = importlib.import_module(path)
File “/usr/lib/python3.5/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 986, in _gcd_import
File “”, line 969, in _find_and_load
File “”, line 958, in _find_and_load_unlocked
File “”, line 673, in _load_unlocked
File “”, line 673, in exec_module
File “”, line 222, in _call_with_frames_removed
File “/home/homeassistant/.homeassistant/custom_components/dahua_event.py”, line 10, in
import threading, logging, os, socket, pycurl, time
ImportError: No module named ‘pycurl’
I think I’m not able to do it. Could you help me please?
I have a virtual environment (“virtualenv --version” said me version 15.1) by default with hassbian so I think I don’t need this HA guide.
I only need to go to /srv/homeassistant (I think this is the virtualenv folder, isn’t it?) logging as homeassistant and use here the pip3 installation command? Is it so simple?
I’m also trying to install the same Dahua event component that eporedieis mentions here, but under HASSIO as a local add-on. I’m having difficulty getting pycurl to install as well. The error msg is “The command ‘/bin/sh -c pip3 install pycurl’ returned a non-zero code: 1”
I’m not entirely sure what prerequisites have to be installed first, but here’s what I have so far. (Some of these libraries may not be needed, and were best guesses). Does anyone have any advice on how to install pycurl in a HASSIO Dockerfile?
ARG BUILD_FROM
FROM $BUILD_FROM
ENV LANG C.UTF-8
ENV PYCURL_SSL_LIBRARY=openssl
RUN apk add --no-cache -U \
python3 \
python3-dev \
curl \
libcurl \
openssl \
&& pip3 install --no-cache --upgrade pip
RUN pip3 install pycurl
COPY dahua_event.py /
RUN chmod a+x /dahua_event.py
ENTRYPOINT ["python3", "/dahua_event.py"]
No, sadly I did not make any further progress and set it aside hoping there would be a Dahua addon with full event capability eventually. A big part of the problem is I have had no experience in creating a forked component for Hassio.
If you come up with a solution for the pycurl install on Hassio I would be happy to help you test it.
Hey, that’s good news you found the right mix of packages to install for pycurl!
I’m currently not using Appdaemon, as good ol’ Yaml automation does all I need (so far). I’ll see if I can find time to get this to work with Hassio without Appdaemon first.