home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.58k stars 29.91k forks source link

0.73 install fails DHT Adafruit_Python_DHT==1.3.2 (as requested by the sensor) #15333

Closed migromao closed 6 years ago

migromao commented 6 years ago

Home Assistant release with the issue: 0.73

Last working Home Assistant release (if known): 0.72.1

Operating environment (Hass.io/Docker/Windows/etc.): Hassbian Please provide details about your environment. DHT22 sensor on raspberry GPIO and google location

Component/platform:

https://www.home-assistant.io/components/sensor.dht/

Description of problem:

ERROR (Thread-21) [homeassistant.util.package] Unable to install package Adafruit_Python_DHT==1.3.2: Failed building wheel for Adafruit-Python-DHT pyowm 2.8.0 has requirement requests<2.19,>=2.18.2, but you'll have requests 2.19.1 which is incompatible. locationsharinglib 2.0.7 has requirement requests==2.18.4, but you'll have requests 2.19.1 which is incompatible.

locationsharinglib 2.0.7 has requirement requests==2.18.4, but you'll have requests 2.19.1 which is incompatible. pyowm 2.8.0 has requirement requests<2.19,>=2.18.2, but you'll have requests 2.19.1 which is incompatible.

huseyint commented 6 years ago

I have this too.

swetoast commented 6 years ago

can confirm this incompatibility issue

PetterSjo commented 6 years ago

Me too

migromao commented 6 years ago

@MigRomao not a fix... but a wokaround for the DHT sensor: on discord , i got help on this

curl -sSL https://gitlab.com/ludeeus/toolbox/raw/master/homeassistant/workarounds/0.73.0%20-%20sensor.dht-hassbian.sh | sudo bash

migromao commented 6 years ago

thank you for this --> Ludeeus#4212

ludeeus commented 6 years ago

@migromao (and others seeing that) That is only tested on Hassbian (venv) with python3.5 The dir will differ if you have any other install method, ant the script will fail

ludeeus commented 6 years ago

initial issue description is somewhat "wrong" Error message when installing Adafruit_Python_DHT==1.3.2 (as requested by the sensor)

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting Adafruit_Python_DHT
  Using cached https://files.pythonhosted.org/packages/52/aa/418b82e36fc57316137679c2a12b8bae89ab73f211cbca91a3275e0b5fc2/Adafruit_Python_DHT-1.3.2.tar.gz
Building wheels for collected packages: Adafruit-Python-DHT
  Running setup.py bdist_wheel for Adafruit-Python-DHT ... error
  Complete output from command /srv/homeassistant/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-r3w93vtf/Adafruit-Python-DHT/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-p9ntvz4t --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-3.6
  creating build/lib.linux-armv7l-3.6/Adafruit_DHT
  copying Adafruit_DHT/platform_detect.py -> build/lib.linux-armv7l-3.6/Adafruit_DHT
  copying Adafruit_DHT/Raspberry_Pi_2.py -> build/lib.linux-armv7l-3.6/Adafruit_DHT
  copying Adafruit_DHT/Beaglebone_Black.py -> build/lib.linux-armv7l-3.6/Adafruit_DHT
  copying Adafruit_DHT/__init__.py -> build/lib.linux-armv7l-3.6/Adafruit_DHT
  copying Adafruit_DHT/common.py -> build/lib.linux-armv7l-3.6/Adafruit_DHT
  copying Adafruit_DHT/Test.py -> build/lib.linux-armv7l-3.6/Adafruit_DHT
  copying Adafruit_DHT/Raspberry_Pi.py -> build/lib.linux-armv7l-3.6/Adafruit_DHT
  running build_ext
  building 'Adafruit_DHT.Raspberry_Pi_2_Driver' extension
  creating build/temp.linux-armv7l-3.6
  creating build/temp.linux-armv7l-3.6/source
  creating build/temp.linux-armv7l-3.6/source/Raspberry_Pi_2
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/srv/homeassistant/include -I/usr/local/include/python3.6m -c source/_Raspberry_Pi_2_Driver.c -o build/temp.linux-armv7l-3.6/source/_Raspberry_Pi_2_Driver.o -std=gnu99
  gcc: error: source/_Raspberry_Pi_2_Driver.c: No such file or directory
  gcc: fatal error: no input files
  compilation terminated.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for Adafruit-Python-DHT
infestdead commented 6 years ago

Same issue here on diet-pi and HA 0.73 (was working fine on 0.72.1)

RssFra97 commented 6 years ago

I have this problem on hass.io

This is a error:

2018-07-07 08:13:12 ERROR (SyncWorker_12) [homeassistant.util.package] Unable to install package Adafruit_Python_DHT==1.3.2: Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-km20nrfs/Adafruit-Python-DHT/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-7tpstr3u-record/install-record.txt --single-version-externally-managed --prefix --compile --user --prefix=” failed with error code 1 in /tmp/pip-build-km20nrfs/Adafruit-Python-DHT/
2018-07-07 08:13:12 ERROR (MainThread) [homeassistant.requirements] Not initializing sensor.dht because could not install requirement Adafruit_Python_DHT==1.3.2
2018-07-07 08:13:12 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.dht: Could not install all requirements.
rdagger commented 6 years ago

DHT22 was working great on Hassbian prior to 0.73.0.
After upgrade:

Unable to prepare setup for platform sensor.dht: Could not install all requirements.
9:06 PM setup.py (ERROR)
Not initializing sensor.dht because could not install requirement Adafruit_Python_DHT==1.3.2
9:06 PM requirements.py (ERROR)
Unable to install package Adafruit_Python_DHT==1.3.2: Command "/srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2smymlpm/Adafruit-Python-DHT/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-n6a3uzml/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.5/Adafruit-Python-DHT" failed with error code 1 in /tmp/pip-install-2smymlpm/Adafruit-Python-DHT/
9:06 PM util/package.py (ERROR)
ludeeus commented 6 years ago

@rdagger Since you have hassbian you can use this:

curl -sSL https://gitlab.com/ludeeus/toolbox/raw/master/homeassistant/workarounds/0.73.0%20-%20sensor.dht-hassbian.sh | sudo bash
rdagger commented 6 years ago

@ludeeus Thanks that worked great!

RssFra97 commented 6 years ago

@ludeeus on hassio not found this is solution

this is error: bash: line 10: sudo: command not found bash: line 13: systemctl: command not found done

ludeeus commented 6 years ago

@RWGaMeR correct, it will only work on Hassbian (and other venv) with python 3.5 This is not a soulution, but a workaround (other that downgrading to 0.72.1)

RssFra97 commented 6 years ago

@ludeeus in addition to downgrade there is no solution for hassio?

ludeeus commented 6 years ago

@RWGaMeR not sure, wait for a patch?

RssFra97 commented 6 years ago

@ludeeus I'm waiting for a patch

RssFra97 commented 6 years ago

the 0.73.1 update is up and running, hopefully

RssFra97 commented 6 years ago

anything

huseyint commented 6 years ago

I have just updated to 0.73.1 and it still fails.

RssFra97 commented 6 years ago

@huseyint confirm

ludeeus commented 6 years ago

There was no fix for it in 0.73.1 so that is expected https://github.com/home-assistant/home-assistant/releases/tag/0.73.1

Pharizna commented 6 years ago

Same problem with YEELIGHT WiFi Bulb: It doesn't work with 0.73.0 or 0.73.1 ... but previously it works without any problem with porevious versions :(

ludeeus commented 6 years ago

@Pharizna I don't think YEELIGHT will stop working due to missing DHT modue. Please open a sepereate issue for that, and fill out the issue template.

Pharizna commented 6 years ago

@ludeeus The main error is the same:

"pyowm 2.8.0 has requirement requests<2.19,>=2.18.2, but you'll have requests 2.19.1 which is incompatible."

ludeeus commented 6 years ago

@Pharizna that is not the source of the issue here ;) The issue here is that the PyPi package requested by the platform can not be compiled.

Pharizna commented 6 years ago

ok.

I have just open a new issue https://github.com/home-assistant/home-assistant/issues/15415

Hat3 commented 6 years ago

Error log for 0.73.1

Jul  8 15:38:00 rasp-camera hass[16608]: 2018-07-08 15:38:00 ERROR (Thread-5) [homeassistant.util.package] Unable to install package Adafruit_Python_DHT==1.3.2: Failed building wheel for Adafruit-Python-DHT
Jul  8 15:38:00 rasp-camera hass[16608]: Command "/srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-gi9h397k/Adafruit-Python-DHT/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-f_ipeo5r/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.5/Adafruit-Python-DHT" failed with error code 1 in /tmp/pip-install-gi9h397k/Adafruit-Python-DHT/
Jul  8 15:38:00 rasp-camera hass[16608]: 2018-07-08 15:38:00 ERROR (MainThread) [homeassistant.requirements] Not initializing sensor.dht because could not install requirement Adafruit_Python_DHT==1.3.2
Jul  8 15:38:00 rasp-camera hass[16608]: 2018-07-08 15:38:00 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.dht: Could not install all requirements.
Jul  8 15:38:49 rasp-camera hass[16608]: 2018-07-08 15:38:49 ERROR (Thread-6) [homeassistant.util.package] Unable to install package Adafruit_Python_DHT==1.3.2: Failed building wheel for Adafruit-Python-DHT
Jul  8 15:38:49 rasp-camera hass[16608]: Command "/srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-xan3teys/Adafruit-Python-DHT/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-3a5oyxzd/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.5/Adafruit-Python-DHT" failed with error code 1 in /tmp/pip-install-xan3teys/Adafruit-Python-DHT/
Jul  8 15:38:49 rasp-camera hass[16608]: 2018-07-08 15:38:49 ERROR (MainThread) [homeassistant.requirements] Not initializing sensor.dht because could not install requirement Adafruit_Python_DHT==1.3.2
Jul  8 15:38:49 rasp-camera hass[16608]: 2018-07-08 15:38:49 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.dht: Could not install all requirements.
csparpa commented 6 years ago

Hi folks, PyOWM maintainer here :)

as regards the

pyowm 2.8.0 has requirement requests<2.19,>=2.18.2, but you'll have requests 2.19.1 which is incompatible.

it is a known issue that will be fixed with PyOWM 2.9 - which has no planned release date so far, but guessing within mid-August.

In order to fix the issue for your specific case of dependency resolution, you can alter PyOWM's -setup.py so that the highest allowed version of requests is 3 instead of 2.19

Hope this helps, in the meanwhile...

sardauker commented 6 years ago

same here, hassio, same errors.

Pharizna commented 6 years ago

Thanks @csparpa but I can't find setup.py in your folder :(

` pi@HASSIO:/srv/homeassistant/lib/python3.5/site-packages/pyowm $ ls -l

total 44

drwxr-xr-x 3 homeassistant nogroup 4096 Jan 18 20:12 abstractions

drwxr-xr-x 3 homeassistant nogroup 4096 Jan 18 20:12 caches

drwxr-xr-x 3 homeassistant nogroup 4096 Jan 18 20:12 commons

-rw-r--r-- 1 homeassistant nogroup 181 Jan 18 20:12 constants.py

drwxr-xr-x 3 homeassistant nogroup 4096 Jan 18 20:12 docs

drwxr-xr-x 3 homeassistant nogroup 4096 Jan 18 20:12 exceptions

-rw-r--r-- 1 homeassistant nogroup 2576 Jan 18 20:12 init.py

drwxr-xr-x 2 homeassistant nogroup 4096 Jan 18 20:12 pycache

drwxr-xr-x 4 homeassistant nogroup 4096 Jan 18 20:12 stationsapi30

drwxr-xr-x 3 homeassistant nogroup 4096 Jan 18 20:12 utils

drwxr-xr-x 5 homeassistant nogroup 4096 Jan 18 20:12 webapi25 `

Where it is?

csparpa commented 6 years ago

@Pharizna I was referring to PyOWM's setup.py.

Please refer to https://github.com/csparpa/pyowm/commit/0d92adaa6b296b136772b6b179c97ad7f0accc4f

I think what you need to do is to

  1. clone PyOWM's development branch
  2. modify setup.py so that requirements match <3 for the requests library
  3. pip install from the local cloned folder (and therefore from the modified setup.py) by launching pip install . from within the folder itself
Pharizna commented 6 years ago

Thank you

I'll try :)

csparpa commented 6 years ago

@Pharizna please do notice that this his a "hand-made" workaround and that when PyOWM 2.9 will be released you will need to remove that and let Home Assistan handle PyOWM installation for you

Pharizna commented 6 years ago

Probably, I will wait because I don't know what's the relations between my Yeelight problem and your PyOWM.

keitetran commented 6 years ago

Me too... how to fix that ? thank

DoctorOctagonapus commented 6 years ago

Anyone know if this has been fixed in 0.73.2? I'm running Hassio so otherwise I'm still stuck on 0.72.1..

bvansambeek commented 6 years ago

Just updated to 0.73.2 , still not able to install packages

googanhiem commented 6 years ago

Also having issues on a RPi B+ with Raspbian and a Homeassistant in a venv.

Though the Hassbian fix script doesn't appear to work for me due some differences in install locations, I think most could manually key in the instructions of this workaround in pip (basically downgrading the version of DHT component), or move the files in an FTP.

sudo wget -O /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/dht.py https://raw.githubusercontent.com/home-assistant/home-assistant/e76e9e0966b01dd16e8e5205a3825b6e8d30ce39/homeassistant/components/sensor/dht.py

Then restart homeassistant

DoctorOctagonapus commented 6 years ago

I wonder if there is a similar fix for Hassio?

seaser0 commented 6 years ago

Same issue here. Does someone know how to install the package on Hassio?

googanhiem commented 6 years ago

This is just a guess, maybe someone can clarify (don't have hassio to test).

sudo wget -O /usr/lib/python3.6/site-packages/homeassistant/components/sensor/dht.py https://raw.githubusercontent.com/home-assistant/home-assistant/e76e9e0966b01dd16e8e5205a3825b6e8d30ce39/homeassistant/components/sensor/dht.py

Or FTP in and navigate to /usr/lib/python3.6/site-packages/homeassistant/components/sensor/ and overwrite the version of dht.py with this.

Then restart hass

MartinHjelmare commented 6 years ago

Please don't spam issues by posting "same issue" and similar things that doesn't add any useful information in the way of solving the issue.

Show that you are affected by reacting to original post with :+1: and click the subscribe button to be notified on updates.

hudecitydave commented 6 years ago

I get this under 0.74.0, still the same:

2018-07-24 11:00:47 ERROR (MainThread) [homeassistant.requirements] Not initializing sensor.dht because could not install requirement Adafruit_Python_DHT==1.3.2 2018-07-24 11:00:47 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.dht: Could not install all requirements.

themultiplexer commented 6 years ago

This fixed it for me: sudo apt-get install --reinstall libmpc*

I tried to install Adafruit_Python_DHT manually and got this error: libmpc.so.3: ELF file version does not match current one

Symlinked the .so everywhere => rebooted, but installation seemed corrupted => reinstall => fixed

daisysung commented 6 years ago

Unfortunately I'm running hassio, sudo apt-get doesnt work

anyone manage to fix this in hassio?

benquan commented 6 years ago

I am having the same issue with a fresh copy of hassio 0.74.2 . Used to work before HASSOS change.

Unable to install package Adafruit_Python_DHT==1.3.2: Failed building wheel for Adafruit-Python-DHT.

pptp-plg commented 6 years ago

This problem is caused by package from https://pypi.org/project/Adafruit_Python_DHT pip3 install Adafruit_Python_DHT error

DoctorOctagonapus commented 6 years ago

https://github.com/adafruit/Adafruit_Python_DHT/issues/99 Corresponding issue on DHT plugin Github page; bug has been fixed in v1.3.3

nhorvath commented 6 years ago

This still doesn't work in 0.74.2.


2018-07-27 09:34:27 ERROR (SyncWorker_2) [homeassistant.util.package] Unable to install package Adafruit_Python_DHT==1.3.2: Failed building wheel for Adafruit-Python-DHT
wirelesstagpy 0.3.0 has requirement colorlog==3.0.1, but you'll have colorlog 3.1.4 which is incompatible.
waterfurnace 0.4.0 has requirement websocket-client>=0.46, but you'll have websocket-client 0.37.0 which is incompatible.
upsmychoice 1.0.6 has requirement beautifulsoup4==4.5.1, but you'll have beautifulsoup4 4.6.0 which is incompatible.
upsmychoice 1.0.6 has requirement python-dateutil==2.6.0, but you'll have python-dateutil 2.7.3 which is incompatible.
upsmychoice 1.0.6 has requirement requests==2.12.4, but you'll have requests 2.19.1 which is incompatible.
toonlib 1.0.2 has requirement cachetools==2.0.0, but you'll have cachetools 2.0.1 which is incompatible.
toonlib 1.0.2 has requirement requests==2.13.0, but you'll have requests 2.19.1 which is incompatible.
temperusb 1.5.3 has requirement pyusb>=1.0.0rc1, but you'll have pyusb 1.0.0b1 which is incompatible.
spotcrime 1.0.3 has requirement requests==2.12.4, but you'll have requests 2.19.1 which is incompatible.
skybellpy 0.1.2 has requirement colorlog==3.0.1, but you'll have colorlog 3.1.4 which is incompatible.
python-velbus 2.0.11 has requirement pyserial==3.3, but you'll have pyserial 3.1.1 which is incompatible.
python-jose-cryptodome 1.3.2 has requirement pycryptodome<3.4.0,>=3.3.1, but you'll have pycryptodome 3.6.4 which is incompatible.
pysma 0.2.0 has requirement aiohttp<3,>2, but you'll have aiohttp 3.3.2 which is incompatible.
pysma 0.2.0 has requirement async-timeout<3,>2, but you'll have async-timeout 3.0.0 which is incompatible.
pyowm 2.8.0 has requirement requests<2.19,>=2.18.2, but you'll have requests 2.19.1 which is incompatible.
pymysensors 0.16.0 has requirement pyserial>=3.4, but you'll have pyserial 3.1.1 which is incompatible.
pymonoprice 0.3 has requirement pyserial>=3.4, but you'll have pyserial 3.1.1 which is incompatible.
pymata 2.14 has requirement pyserial==2.7, but you'll have pyserial 3.1.1 which is incompatible.
pyicloud 0.9.1 has requirement keyring<9.0,>=8.0, but you'll have keyring 13.2.1 which is incompatible.
pyicloud 0.9.1 has requirement keyrings.alt<2.0,>=1.0, but you'll have keyrings-alt 3.1 which is incompatible.
pyblackbird 0.5 has requirement pyserial>=3.4, but you'll have pyserial 3.1.1 which is incompatible.
nad-receiver 0.0.9 has requirement pyserial==3.2.1, but you'll have pyserial 3.1.1 which is incompatible.
myusps 1.3.2 has requirement python-dateutil==2.6.0, but you'll have python-dateutil 2.7.3 which is incompatible.
myusps 1.3.2 has requirement requests==2.12.4, but you'll have requests 2.19.1 which is incompatible.
myusps 1.3.2 has requirement selenium==2.53.6, but you'll have selenium 3.13.0 which is incompatible.
mycroftapi 2.0 has requirement websocket-client==0.44.0, but you'll have websocket-client 0.37.0 which is incompatible.
motorparts 1.0.2 has requirement beautifulsoup4==4.5.1, but you'll have beautifulsoup4 4.6.0 which is incompatible.
motorparts 1.0.2 has requirement requests==2.12.4, but you'll have requests 2.19.1 which is incompatible.
locationsharinglib 2.0.7 has requirement requests==2.18.4, but you'll have requests 2.19.1 which is incompatible.
libsoundtouch 0.7.2 has requirement websocket-client>=0.40.0, but you'll have websocket-client 0.37.0 which is incompatible.
insteonplm 0.11.3 has requirement pyserial==3.2.0, but you'll have pyserial 3.1.1 which is incompatible.
hipnotify 1.0.8 has requirement requests==2.9.1, but you'll have requests 2.19.1 which is incompatible.
fedexdeliverymanager 1.0.6 has requirement beautifulsoup4==4.5.1, but you'll have beautifulsoup4 4.6.0 which is incompatible.
fedexdeliverymanager 1.0.6 has requirement python-dateutil==2.6.0, but you'll have python-dateutil 2.7.3 which is incompatible.
discord-py 0.16.12 has requirement aiohttp<1.1.0,>=1.0.0, but you'll have aiohttp 3.3.2 which is incompatible.
crimereports 1.0.0 has requirement requests==2.12.4, but you'll have requests 2.19.1 which is incompatible.
broadlink 0.9 has requirement pycryptodome==3.4.11, but you'll have pycryptodome 3.6.4 which is incompatible.
alarmdecoder 1.13.2 has requirement pyserial==2.7, but you'll have pyserial 3.1.1 which is incompatible.
abodepy 0.13.1 has requirement colorlog==3.0.1, but you'll have colorlog 3.1.4 which is incompatible.
Command "/usr/local/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-q1cs3fcb/Adafruit-Python-DHT/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-lz02qqkc/install-record.txt --single-version-externally-managed --prefix  --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-q1cs3fcb/Adafruit-Python-DHT/
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
2018-07-27 09:34:27 ERROR (MainThread) [homeassistant.requirements] Not initializing sensor.dht because could not install requirement Adafruit_Python_DHT==1.3.2
2018-07-27 09:34:27 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.dht: Could not install all requirements.