DrozmotiX / ioBroker.esphome

Control your ESP8266/ESP32 with simple yet powerful configuration files created and managed by ESPHome
MIT License
30 stars 23 forks source link

Fehler: Please install the pillow python package #188

Closed kailausberg closed 10 months ago

kailausberg commented 10 months ago

Nach Update von v0.24 auf v0.5.0 wird bei der Verwendung der Display Komponente und eigenen Fonts folgender Fehler angezeigt:

Please install the pillow python package to use this feature. (pip install "pillow==10.0.1"

Failed config > font: [source /opt/iobroker/iobroker-data/esphome.0/WaveshareDisplay.yaml:82] Please install the pillow python package to use this feature. (pip install "pillow==10.0.1") file: fonts/arial.ttf

https://esphome.io/components/display/index.html To use fonts you will need to have the python pillow package installed, as ESPHome uses that package to translate the TrueType and bitmap font files into an internal format. If you’re running this as a Home Assistant add-on or with the official ESPHome docker image, it should already be installed. Otherwise you need to install it using pip install "pillow>4.0.0,<10.0.0".

Python 3.9.2 Debian GNU/Linux 11 (bullseye) python3-pil = 8.1.2+dfsg-0.3+deb11u1 python3-pil.imagetk = 8.1.2+dfsg-0.3+deb11u1

DutchmanNL commented 10 months ago

@SimonFischer04 as we do not use the local python anymore after changes made in previously, any suggestion/idea how this kind of external packages could be related

SimonFischer04 commented 10 months ago

@DutchmanNL 1. Kannst eh auf Deutsch auch schteiben, vor allem wenn der originalpost Deutsch ist. Ich bins nur normalerweise irgendwie gewohnt in Github issues English zu schreiben :)

Naja der Log ist schon recht klar. Anscheinend braucht man dafür extra python package. Sollt eigentlich nicht damit zusammenhänge aber du hattest früher noch "tornado" als pip dependency dabei (das villeicht darauf a dependency hat und darum mitinstalliert?) Das package sah für mich damals unused aus drum hab ichs weggmacht - oda hatte das einen sinn?

@kailausberg hattest du auf dem system das entsprechende pillow package einmal extra nachinstalliert? Weil standard sollte das eigwntlich nicht mitkommen.

DutchmanNL commented 10 months ago

@SimonFischer04 und wieder erwünscht, mach der Gewohnheit auf gut 😀

Sagen wir so, ich verstehe den Zusammenhang nicht komplett mit der neuen lib, bei vorigen war es so das Python installiert sein musste um im grinsen das nach nodeJS geparst wurde. Das hat auch andere eventuelle pakketje, wie dieses Beispiel, exposee

Ist es in dem neigen Modul auch so geregeld das er die Module von System übernimmt oder ist es eine Art isolatie Container (so hatte ich es verstanden)

SimonFischer04 commented 10 months ago

@SimonFischer04 und wieder erwünscht, mach der Gewohnheit auf gut 😀

Sagen wir so, ich verstehe den Zusammenhang nicht komplett mit der neuen lib, bei vorigen war es so das Python installiert sein musste um im grinsen das nach nodeJS geparst wurde. Das hat auch andere eventuelle pakketje, wie dieses Beispiel, exposee

Ist es in dem neigen Modul auch so geregeld das er die Module von System übernimmt oder ist es eine Art isolatie Container (so hatte ich es verstanden)

Ist nen "isolated container". Eigentlich der standard wie man python (vor allem auf linux-systemen) schon lange verwenden sollte, weil mehrere verschiedene packet-manager (apt/pip) konflikte mit verschiedenen versionen hervorufen kann. Wurde nur vor " kurzem" enforced. Schau einfach mal nach "python venv".

Die neue lib macht einfach nur so ein venv im system-cache folder (z.b. ~/.cache/autopy/...)

SimonFischer04 commented 10 months ago

Müssten das packet somit ins venv ("isolated container") zusätzlich mit aufnehmen.

Standard ist das aber nicht, daher hab ich auch nachgefragt ob der OP das mal manuell geadded hat feüher.

I schau mir das mal an das zu adden.

Aber als workaround sollt mal gehen: Python venv activieren: 'source ~/.cache/autopy/(venv/esphome)/bin/activate' () - bin mir nd ganz sicher, habs grad nd da aber einfach mal schauen dann findst es schon

'pip install pillow'

DutchmanNL commented 10 months ago

Aber als workaround sollt mal gehen: Python venv activieren: 'source ~/.cache/autopy/(venv/esphome)/bin/activate' () - bin mir nd ganz sicher, habs grad nd da aber einfach mal schauen dann findst es schon

'pip install pillow'

@kailausberg bist du in der Gelegenheit das zu probieren?

kailausberg commented 10 months ago

Aber als workaround sollt mal gehen: Python venv activieren: 'source ~/.cache/autopy/(venv/esphome)/bin/activate' () - bin mir nd ganz sicher, habs grad nd da aber einfach mal schauen dann findst es schon 'pip install pillow'

@kailausberg bist du in der Gelegenheit das zu probieren?

Versuche ich gerne!

Das war ja meine Ursprungsfrage im iobroker Forum, wie ich "richtig" pip UND pillow installiere, da keine Ahnung von dem py Zeugs. Wie installiere ich "richtig" pip für python 3.9 ? Muss da ne enviroment variable gestezt werden...?

PS: Soweit ich das verstanden habe, ist das neue pillow package (> v10.0) im HA Paket inkludiert und wird vorausgesetzt (> v10.0) und auch in dem ESPhome Container. In meiner bullseye Basis Installation ist nur das Standard Python ohne zusätzliche Installationen.

kailausberg commented 10 months ago

Habe gerade mal pip3 installiert mit sudo apt install python3-pip und das pillow Paket mit pip3 install "pillow==10.0.1"

Die Fehlermeldung bleibt leider identisch Please install the pillow python package to use this feature. (pip install "pillow==10.0.1")

kailausberg commented 10 months ago

Python venv activieren: 'source ~/.cache/autopy/(venv/esphome)/bin/activate' () - bin mir nd ganz sicher, habs grad nd da aber einfach mal schauen dann findst es schon 'pip install pillow'

Habe nun mal in dem venv pillow installiert: python3 -m venv venv source venv/bin/activate pip install pillow

Die Fehlermeldung vermeldet noch immer das fehlende pillow package...

@SimonFischer04 War das so gemeint und richtig? Finde ansonsten hierzu 'source ~/.cache/autopy/(venv/esphome)/bin/activate' nichts anders...

SimonFischer04 commented 10 months ago

Python venv activieren: 'source ~/.cache/autopy/(venv/esphome)/bin/activate' () - bin mir nd ganz sicher, habs grad nd da aber einfach mal schauen dann findst es schon 'pip install pillow'

Habe nun mal in dem venv pillow installiert: python3 -m venv venv source venv/bin/activate pip install pillow

Die Fehlermeldung vermeldet noch immer das fehlende pillow package...

@SimonFischer04 War das so gemeint und richtig? Finde ansonsten hierzu 'source ~/.cache/autopy/(venv/esphome)/bin/activate' nichts anders...

sorry falls das etwas unklar war aber wusste den genauen pfad gerade nicht auswendig, hab jetzt auf meinem system mal nachgeschaut.

@SimonFischer04 War das so gemeint und richtig? nein leider nicht, damit hast du ein neues venv erstellt

gemeint ist aber in dem bereits existierenden. auch wichtig: wahrscheinlich hast du (wie ich auch grade kurz) falsch geschaut. als root-eingeloggt aber iobroker läuft ja richtigerweise als iobroker user. daher: source /home/iobroker/.cache/autopy/venv/esphome/bin/activate pip install pillow

SimonFischer04 commented 10 months ago

or just wait a moment

SimonFischer04 commented 10 months ago

Habe gerade mal pip3 installiert mit sudo apt install python3-pip und das pillow Paket mit pip3 install "pillow==10.0.1"

Die Fehlermeldung bleibt leider identisch Please install the pillow python package to use this feature. (pip install "pillow==10.0.1")

das systemweite python ist mittlerweile egal / wird komplett ignoriert, daher steht es auch nicht mehr als requirement in der readme

SimonFischer04 commented 10 months ago

Done, now it should also install the pillow package with latest version. see: https://github.com/DrozmotiX/ioBroker.esphome/pull/190

Draexl commented 8 months ago

Hallo, mit der neuesten Version kommt diese Meldung. Es wird also schon wieder ein neues Paket benötigt. Please update your pillow installation to 10.1.0. (pip install "pillow==10.1.0").

SimonFischer04 commented 8 months ago

Any specific reason for fixing it to a specific version here: https://github.com/DrozmotiX/ioBroker.esphome/commit/6600a6aeb9a82fcecc5f848aa72a780d73998402 and not just always use the latest to avoid this?

Draexl commented 8 months ago

Any Updates here?

SimonFischer04 commented 8 months ago

Any specific reason for fixing it to a specific version here: 6600a6a and not just always use the latest to avoid this?

@Draexl kindof waiting for a response from @DutchmanNL on this, i assume he had a specific reason for it. I'm not sure because I don't know him, but I guess he's busy currently, because I can't see any responses from him here.

stmb-100 commented 8 months ago

Hallo zusammen kann das Problem nur DutchmanNL lösen oder würde es sich auch jemand anders zutrauen ?

SimonFischer04 commented 7 months ago

@stmb-100 Fix selbst solt sehr simple sein, habs schnell wieder umgebaut. Frage ist eher was zuvor das Problem war / warum es auf fixe Version geändert wurden. Try installing directly from Github: https://github.com/SimonFischer04/ioBroker.esphome/tree/fix/latestpillow

SimonFischer04 commented 7 months ago

@stmb-100 und wenn du schon so ne frage stellt: würdest du es dir auch selbst zutrauen 😄?

Ist wirklich kein komplexes Problem / fix. Wie schon im letzten comment beschrieben, ein undo von: https://github.com/DrozmotiX/ioBroker.esphome/commit/6600a6aeb9a82fcecc5f848aa72a780d73998402