Pb dependances jeedom 4.5

Bonjour,

Aujourd’hui, j’ai basculé mon environnement sur debian 12. Il etait déjà en jeedom 4.5
Et pour 2 plugins, j’ai été confronté à un pb de dependances python

Pour cette installation en beta, après avoir installé une image debian 12 (je ne pense pas que le pb soit lié à deb12), j’ai installé jeedom en beta directement, donc 4.5

./install -v beta

puis j’ai restauré mon jeedom 4.5 beta en ligne de commande (qui fonctionnait bien avant)

2 plugins n’ont pas demarré malgré une resinstallation forcée :
plugin-devolo_cpl
plugin-jeedomconnect

pour les remettre en route (merci @tomitomas), j’ai été obligé de reinstaller à la main des dépendances python :

pour jeedomconnect :

sudo apt-get install python3-requests

pour devolo-CPL :

sudo apt-get install python3-httpx python3-importlib-metadata python3-ifaddr  python3-zeroconf python3-protobuf

Voilà, le pb est réglé chez moi, juste pour signaler

Norbert

1 « J'aime »

Pour devolo_cpl:
C’est bizarre, il semble que la version mise dans le market ne soit pas la dernière version sur Github.

Il faut que je regarde ça de plus près ce weekend.

Pour info le problème ne vient pas des packages non installé mais du fait que le daemon n’est pas lancé dans le venv python.

Problème résolu pour devolo_cpl.

C’est moi qui était en vrac avec dans mon repository Github. :upside_down_face:

Les package apt indiqués plus haut n’ont pas besoin d’être installés car les modules sont installés dans le venv python créé lors de l’installation des dépendances.

Désolé pour la confusion.

J’ai ce message d’erreur :

sh: 1: /var/www/html/plugins/devolo_cpl/core/class/../../resources/venv/bin/python3: not found
sh: 1: /var/www/html/plugins/devolo_cpl/core/class/../../resources/venv/bin/python3: not found
sh: 1: /var/www/html/plugins/devolo_cpl/core/class/../../resources/venv/bin/python3: not found

python3 semble etre chez moi dans python_venv et pas juste venv

`jeedom@domo42:/var/www/html/plugins/devolo_cpl/resources/python_venv/bin$ ls
activate  activate.csh  activate.fish  Activate.ps1  httpx  normalizer  pip  pip3  pip3.11  python  python3  python3.11  wheel

Norbert

As-tu tenté de relancer l’installation des dépendances?

Si oui, quel est le contenu du log devolo_cpl_daemon?

voilà :

+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_devolo_cpl
+ echo 1
+ echo 2
+ sudo apt update
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Atteint :1 http://deb.debian.org/debian bookworm InRelease
Atteint :2 http://security.debian.org bookworm-security InRelease
Atteint :3 http://deb.debian.org/debian bookworm-updates InRelease
Atteint :4 http://deb.debian.org/debian bookworm-backports InRelease
Atteint :5 https://download.docker.com/linux/debian bookworm InRelease
Atteint :6 https://deb.nodesource.com/node_20.x nodistro InRelease
Atteint :7 http://netcup.armbian.com/apt bookworm InRelease
Lecture des listes de paquets...
Construction de l'arbre des d?pendances...
Lecture des informations d'?tat...
1 paquet peut ?tre mis ? jour. Ex?cutez << apt list --upgradable >> pour le voir.
+ sudo apt-get install -y python3 python3-pip python3-dev python3-venv
Lecture des listes de paquets...
Construction de l'arbre des d?pendances...
Lecture des informations d'?tat...
python3 est d?j? la version la plus r?cente (3.11.2-1+b1).
python3-pip est d?j? la version la plus r?cente (23.0.1+dfsg-1).
python3-dev est d?j? la version la plus r?cente (3.11.2-1+b1).
python3-venv est d?j? la version la plus r?cente (3.11.2-1+b1).
0 mis ? jour, 0 nouvellement install?s, 0 ? enlever et 1 non mis ? jour.
+ echo 3
+ sudo python3 -m venv --upgrade-deps /var/www/html/core/class/../../plugins/devolo_cpl/resources/python_venv
+ echo 4
+ sudo /var/www/html/core/class/../../plugins/devolo_cpl/resources/python_venv/bin/python3 -m pip install --upgrade pip wheel
Requirement already satisfied: pip in /var/www/html/plugins/devolo_cpl/resources/python_venv/lib/python3.11/site-packages (24.2)
Collecting wheel
Using cached wheel-0.44.0-py3-none-any.whl.metadata (2.3 kB)
Using cached wheel-0.44.0-py3-none-any.whl (67 kB)
Installing collected packages: wheel
Successfully installed wheel-0.44.0
+ echo 5
+ sudo /var/www/html/core/class/../../plugins/devolo_cpl/resources/python_venv/bin/python3 -m pip install --force-reinstall --upgrade requests
Collecting requests
Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting charset-normalizer<4,>=2 (from requests)
Using cached charset_normalizer-3.4.0-py3-none-any.whl.metadata (34 kB)
Collecting idna<4,>=2.5 (from requests)
Using cached idna-3.10-py3-none-any.whl.metadata (10 kB)
Collecting urllib3<3,>=1.21.1 (from requests)
Using cached urllib3-2.2.3-py3-none-any.whl.metadata (6.5 kB)
Collecting certifi>=2017.4.17 (from requests)
Using cached certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB)
Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Using cached certifi-2024.8.30-py3-none-any.whl (167 kB)
Using cached charset_normalizer-3.4.0-py3-none-any.whl (49 kB)
Using cached idna-3.10-py3-none-any.whl (70 kB)
Using cached urllib3-2.2.3-py3-none-any.whl (126 kB)
Installing collected packages: urllib3, idna, charset-normalizer, certifi, requests
Successfully installed certifi-2024.8.30 charset-normalizer-3.4.0 idna-3.10 requests-2.32.3 urllib3-2.2.3
+ echo 6
+ sudo /var/www/html/core/class/../../plugins/devolo_cpl/resources/python_venv/bin/python3 -m pip install --force-reinstall --upgrade httpx==0.21.0
Collecting httpx==0.21.0
Using cached httpx-0.21.0-py3-none-any.whl.metadata (49 kB)
Collecting certifi (from httpx==0.21.0)
Using cached certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB)
Collecting charset-normalizer (from httpx==0.21.0)
Using cached charset_normalizer-3.4.0-py3-none-any.whl.metadata (34 kB)
Collecting sniffio (from httpx==0.21.0)
Using cached sniffio-1.3.1-py3-none-any.whl.metadata (3.9 kB)
Collecting rfc3986<2,>=1.3 (from rfc3986[idna2008]<2,>=1.3->httpx==0.21.0)
Using cached rfc3986-1.5.0-py2.py3-none-any.whl.metadata (6.5 kB)
Collecting httpcore<0.15.0,>=0.14.0 (from httpx==0.21.0)
Using cached httpcore-0.14.7-py3-none-any.whl.metadata (15 kB)
Collecting h11<0.13,>=0.11 (from httpcore<0.15.0,>=0.14.0->httpx==0.21.0)
Using cached h11-0.12.0-py3-none-any.whl.metadata (8.1 kB)
Collecting anyio==3.* (from httpcore<0.15.0,>=0.14.0->httpx==0.21.0)
Using cached anyio-3.7.1-py3-none-any.whl.metadata (4.7 kB)
Collecting idna>=2.8 (from anyio==3.*->httpcore<0.15.0,>=0.14.0->httpx==0.21.0)
Using cached idna-3.10-py3-none-any.whl.metadata (10 kB)
Using cached httpx-0.21.0-py3-none-any.whl (83 kB)
Using cached httpcore-0.14.7-py3-none-any.whl (68 kB)
Using cached sniffio-1.3.1-py3-none-any.whl (10 kB)
Using cached anyio-3.7.1-py3-none-any.whl (80 kB)
Using cached rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)
Using cached certifi-2024.8.30-py3-none-any.whl (167 kB)
Using cached charset_normalizer-3.4.0-py3-none-any.whl (49 kB)
Using cached h11-0.12.0-py3-none-any.whl (54 kB)
Using cached idna-3.10-py3-none-any.whl (70 kB)
Installing collected packages: rfc3986, sniffio, idna, h11, charset-normalizer, certifi, anyio, httpcore, httpx
Attempting uninstall: idna
Found existing installation: idna 3.10
Uninstalling idna-3.10:
Successfully uninstalled idna-3.10
Attempting uninstall: charset-normalizer
Found existing installation: charset-normalizer 3.4.0
Uninstalling charset-normalizer-3.4.0:
Successfully uninstalled charset-normalizer-3.4.0
Attempting uninstall: certifi
Found existing installation: certifi 2024.8.30
Uninstalling certifi-2024.8.30:
Successfully uninstalled certifi-2024.8.30
Successfully installed anyio-3.7.1 certifi-2024.8.30 charset-normalizer-3.4.0 h11-0.12.0 httpcore-0.14.7 httpx-0.21.0 idna-3.10 rfc3986-1.5.0 sniffio-1.3.1
+ echo 7
+ sudo /var/www/html/core/class/../../plugins/devolo_cpl/resources/python_venv/bin/python3 -m pip install --force-reinstall --upgrade zeroconf==0.36.8
Collecting zeroconf==0.36.8
Using cached zeroconf-0.36.8-py3-none-any.whl.metadata (40 kB)
Collecting ifaddr>=0.1.7 (from zeroconf==0.36.8)
Using cached ifaddr-0.2.0-py3-none-any.whl.metadata (4.9 kB)
Using cached zeroconf-0.36.8-py3-none-any.whl (103 kB)
Using cached ifaddr-0.2.0-py3-none-any.whl (12 kB)
Installing collected packages: ifaddr, zeroconf
Successfully installed ifaddr-0.2.0 zeroconf-0.36.8
+ echo 8
+ sudo /var/www/html/core/class/../../plugins/devolo_cpl/resources/python_venv/bin/python3 -m pip install --force-reinstall --upgrade protobuf==4.21.12
Collecting protobuf==4.21.12
Using cached protobuf-4.21.12-py3-none-any.whl.metadata (541 bytes)
Using cached protobuf-4.21.12-py3-none-any.whl (291 kB)
Installing collected packages: protobuf
Successfully installed protobuf-4.21.12
+ echo 9
+ sudo /var/www/html/core/class/../../plugins/devolo_cpl/resources/python_venv/bin/python3 -m pip install --force-reinstall --upgrade importlib-metadata==6.0.0
Collecting importlib-metadata==6.0.0
Using cached importlib_metadata-6.0.0-py3-none-any.whl.metadata (5.0 kB)
Collecting zipp>=0.5 (from importlib-metadata==6.0.0)
Using cached zipp-3.20.2-py3-none-any.whl.metadata (3.7 kB)
Using cached importlib_metadata-6.0.0-py3-none-any.whl (21 kB)
Using cached zipp-3.20.2-py3-none-any.whl (9.2 kB)
Installing collected packages: zipp, importlib-metadata
Successfully installed importlib-metadata-6.0.0 zipp-3.20.2
+ echo 10
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end devolo_cpl
+ echo 11
+ rm /tmp/jeedom_install_in_progress_devolo_cpl
+ echo '*******************End of package installation******************'
*******************End of package installation******************

je ne comprend pas très bien,

voici le log de l’installation des dépendances sur une debian12:

0000|BASE_DIR: /var/www/html/plugins/devolo_cpl/resources
0001|======================================================================
0002|== 25/10/2024 21:49:11 == Installation des dépendances de devolo_cpl
0003|======================================================================
0004|[  5% ] : Clean apt...
0005|[  9% ] : Clean apt : [  OK  ]
0006|[ 10% ] : Update apt...
0007|[ 19% ] : Update apt : [  OK  ]
0008|[ 20% ] : Init python3 & prerequisites...
0009|[ 31% ] : Init python3 & prerequisites : [  OK  ]
0010|[ 32% ] : Init pyEnv...
0011|** PyEnv not required: 3.11.2 >= 3.9 **
0012|** python3 path: python3 **
0013|[ 43% ] : Init pyEnv : [  OK  ]
0014|[ 44% ] : Setting up virtual environment...
0015|** Version of python in VENV: Python 3.11.2
0016|[ 79% ] : Setting up virtual environment : [  OK  ]
0017|[ 80% ] : Install the required python packages...
0018|[ 89% ] : Install the required python packages : [  OK  ]
0019|[ 90% ] : Summary of installed packages...
0020|anyio==4.6.2.post1
0021|certifi==2024.8.30
0022|charset-normalizer==3.4.0
0023|devolo-plc-api==1.4.1
0024|h11==0.14.0
0025|httpcore==1.0.6
0026|httpx==0.27.2
0027|idna==3.10
0028|ifaddr==0.2.0
0029|protobuf==5.28.3
0030|requests==2.32.3
0031|segno==1.6.1
0032|sniffio==1.3.1
0033|urllib3==2.2.3
0034|zeroconf==0.135.0
0035|[ 99% ] : Summary of installed packages : [  OK  ]
0036|[100% ] : Terminé !
0037|======================================================================
0038|== OK == Installation Réussie
0039|======================================================================

De plus, chez moi, le répertoire contenant le venv n’est pas python_venv mais venv

quel est le contenu du répertoire plugin_info ?

Je ne serais pas surpris si tu as un fichier plugin_info/packages.json. Si c’est la cas, ce fichier ne fait pas partie du plugin et il faut que tu le supprime avant de relancer l’installation des dépendances.

Oui, j’avais un packqage.json dont le contenu était le suivant

{
  "pip3": {
    "requests" :           {},
    "httpx" :              { "version" : "0.21.0" },
    "zeroconf" :           { "version" : "0.36.8" },
    "protobuf" :           { "version" : "4.21.12" },
    "importlib-metadata" : { "version" : "6.0.0" }
  }
}

… Supprimé et install des dependances dans la foulée. ca m’a créé du coup un autre fichier de log devolo_cpl_update

et tout est OK ensuite (j’ai supprimé à la main python_venv ensuite)

Merci !

Du coup, une idée du pourquoi j’avais un package.json ?

Norbert

Probablement un résidu de la version précédente qui n’a pas été nettoyé par le core.

Je publie demain une mise à jour qui fera le nettoyage si ce n’est pas déjà fait.

Mise à jour publiée,

Si présent, le fichier plugin_info/packages.json est supprimé lors de la mise à jour du plugin ou lors de son activation.

1 « J'aime »

Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.