Problème à l'installation des dépendances

J’ai voulu réinstallé ce plugin sur ma smart et j’avais des erreurs d’installation des dépendances que j’ai réglée en modifiant la ligne 23 du fichier /plugins/brother/ressources/install_apt.sh comme cela (ajout de « –system… »):

try sudo -u www-data python3 -m venv $BASEDIR/venv --system-site-packages

Pour info le log lors de l’install défectueuse:

================================================================================
== Jeedom 4.4.8.1 smart in Debian GNU/Linux 10 (buster) on aarch64/arm64/64bits
== Python 3.7.3 (default, Mar 23 2024, 16:12:05) [GCC 8.3.0]
== brother v9 (2024-03-18 00:01:12) branch:stable
======================================================================
== 23/07/2024 12:18:59 == Dependencies installation for brother
======================================================================
[  0% ] : Synchronize the package index...
[  9% ] : Synchronize the package index : [  OK  ]
[ 10% ] : Purge dynamic contents...
[ 29% ] : Purge dynamic contents : [  OK  ]
[ 30% ] : Install python3 venv and pip debian packages...
[ 49% ] : Install python3 venv and pip debian packages : [  OK  ]
[ 50% ] : Create a python3 Virtual Environment...
[ 69% ] : Create a python3 Virtual Environment : [  OK  ]
[ 70% ] : Install required python3 libraries in venv...
[ 99% ] : Install required python3 libraries in venv :  ERROR 
[100% ] : Finished !
======================================================================
==KO== Installation Error
======================================================================
== ANALYSING ERRORS...
== NO KNOWN ERROR DETECTED
== Error in step : Install required python3 libraries in venv
== Line 26
== Command `sudo -u www-data /var/www/html/plugins/brother/resources/venv/bin/pip3 install --no-cache-dir -r /var/www/html/plugins/brother/resources/requirements.txt' have an issue
== Return code is 2
== Error message :
Collecting brother==1.0.2 (from -r /var/www/html/plugins/brother/resources/requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/ae/db/da8c726d157a9f2cb8ccba1c5702db6e5607f206851a70ddd631ae3e1a6a/brother-1.0.2-py3-none-any.whl
Collecting pyasn1==0.4.8 (from -r /var/www/html/plugins/brother/resources/requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/62/1e/a94a8d635fa3ce4cfc7f506003548d0a2447ae76fd5ca53932970fe3053f/pyasn1-0.4.8-py2.py3-none-any.whl (77kB)
Collecting requests==2.31.0 (from -r /var/www/html/plugins/brother/resources/requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl (62kB)
Collecting pysnmp (from brother==1.0.2->-r /var/www/html/plugins/brother/resources/requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/1b/f9/9dbf762c9f3a80d600ccba79002d2a38b38badfa41fcbc9a522f586cfbc7/pysnmp-6.0.13-py3-none-any.whl (278kB)
Collecting idna<4,>=2.5 (from requests==2.31.0->-r /var/www/html/plugins/brother/resources/requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/e5/3e/741d8c82801c347547f8a2a06aa57dbb1992be9e948df2ea0eda2c8b79e8/idna-3.7-py3-none-any.whl (66kB)
Collecting urllib3<3,>=1.21.1 (from requests==2.31.0->-r /var/www/html/plugins/brother/resources/requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/d2/b2/b157855192a68541a91ba7b2bbcb91f1b4faa51f8bae38d8005c034be524/urllib3-2.0.7-py3-none-any.whl (124kB)
Collecting certifi>=2017.4.17 (from requests==2.31.0->-r /var/www/html/plugins/brother/resources/requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/1c/d5/c84e1a17bf61d4df64ca866a1c9a913874b4e9bdc131ec689a0ad013fb36/certifi-2024.7.4-py3-none-any.whl (162kB)
Collecting charset-normalizer<4,>=2 (from requests==2.31.0->-r /var/www/html/plugins/brother/resources/requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/28/76/e6222113b83e3622caa4bb41032d0b1bf785250607392e1b778aca0b8a7d/charset_normalizer-3.3.2-py3-none-any.whl (48kB)
Collecting pysmi<1.3.0,>=1.0.4 (from pysnmp->brother==1.0.2->-r /var/www/html/plugins/brother/resources/requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/72/94/44c4c52a407c8241a8aaefe62acc9a5ad00a28a2c0339c22805b85a6272b/pysmi-1.2.1-py3-none-any.whl (79kB)
Collecting pysnmpcrypto<0.0.5,>=0.0.4 (from pysnmp->brother==1.0.2->-r /var/www/html/plugins/brother/resources/requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/dd/ee/3ba0ddd4650ad5251479be614dacff65db920274f575825d48663a4ce7b9/pysnmpcrypto-0.0.4-py2.py3-none-any.whl
Collecting ply<4.0,>=3.11 (from pysmi<1.3.0,>=1.0.4->pysnmp->brother==1.0.2->-r /var/www/html/plugins/brother/resources/requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/a3/58/35da89ee790598a0700ea49b2a66594140f44dec458c07e8e3d4979137fc/ply-3.11-py2.py3-none-any.whl (49kB)
Collecting cryptography; python_version >= "3.4" (from pysnmpcrypto<0.0.5,>=0.0.4->pysnmp->brother==1.0.2->-r /var/www/html/plugins/brother/resources/requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/69/ec/9fb9dcf4f91f0e5e76de597256c43eedefd8423aa59be95c70c4c3db426a/cryptography-43.0.0.tar.gz (686kB)
Exception:
Traceback (most recent call last):
File "/var/www/html/plugins/brother/resources/venv/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 143, in main
status = self.run(options, args)
File "/var/www/html/plugins/brother/resources/venv/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 338, in run
resolver.resolve(requirement_set)
File "/var/www/html/plugins/brother/resources/venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 102, in resolve
self._resolve_one(requirement_set, req)
File "/var/www/html/plugins/brother/resources/venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/var/www/html/plugins/brother/resources/venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
self.require_hashes
File "/var/www/html/plugins/brother/resources/venv/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 298, in prepare_linked_requirement
abstract_dist.prep_for_dist(finder, self.build_isolation)
File "/var/www/html/plugins/brother/resources/venv/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 100, in prep_for_dist
self.req.load_pyproject_toml()
File "/var/www/html/plugins/brother/resources/venv/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 428, in load_pyproject_toml
str(self)
File "/var/www/html/plugins/brother/resources/venv/lib/python3.7/site-packages/pip/_internal/pyproject.py", line 43, in load_pyproject_toml
pp_toml = pytoml.load(f)
File "/var/www/html/plugins/brother/resources/venv/share/python-wheels/pytoml-0.1.2-py2.py3-none-any.whl/pytoml/parser.py", line 303, in load
filename=fin.name)
File "/var/www/html/plugins/brother/resources/venv/share/python-wheels/pytoml-0.1.2-py2.py3-none-any.whl/pytoml/parser.py", line 370, in loads
toks.expect('=', 'expected_equals')
File "/var/www/html/plugins/brother/resources/venv/share/python-wheels/pytoml-0.1.2-py2.py3-none-any.whl/pytoml/parser.py", line 250, in expect
self.error(error_text)
File "/var/www/html/plugins/brother/resources/venv/share/python-wheels/pytoml-0.1.2-py2.py3-none-any.whl/pytoml/parser.py", line 253, in error
raise TomlError(message, self.pos[0][0], self.pos[0][1], self._filename)
pytoml.core.TomlError: /tmp/pip-install-8a3amsf7/cryptography/pyproject.toml(172, 5): expected_equals
======================================================================

Informations Jeedom Atlas

Core : 4.4.8.1 (V4-stable)
DNS Jeedom Atlas : oui

Plugin : Brother
Version : 2024-03-18 00:01:12 (stable)

Hello @Noyax37,

Je viens de publier une nouvelle beta supportant maintenant Debian 12, cf :

Dit-moi si c’est OK et on pourra enfin fermer ce sujet :slight_smile:

Bad

Salut @Bad , depuis ce post je n’ai plus ma smart et je suis passé à l’Atlas. Je ne me souvenais plus de ce post et sur l’Atlas la v9 avait bien été installée si je me souviens bien… Je viens tout de même de passer avec ta v11.

Ci dessous le log d’installation des dépendances pour la v9 de ce soir réinstallée depuis la stable

================================================================================
== Jeedom 4.4.15 Atlas in Debian GNU/Linux 11 (bullseye) on aarch64/arm64/64bits
== Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
== brother v9 (2024-03-18 00:01:12) branch:stable
======================================================================
== 08/09/2024 20:55:45 == Dependencies installation for brother
======================================================================
[  0% ] : Synchronize the package index...
[  9% ] : Synchronize the package index : [  OK  ]
[ 10% ] : Purge dynamic contents...
[ 29% ] : Purge dynamic contents : [  OK  ]
[ 30% ] : Install python3 venv and pip debian packages...
[ 49% ] : Install python3 venv and pip debian packages : [  OK  ]
[ 50% ] : Create a python3 Virtual Environment...
[ 69% ] : Create a python3 Virtual Environment : [  OK  ]
[ 70% ] : Install required python3 libraries in venv...
[ 99% ] : Install required python3 libraries in venv : [  OK  ]
[100% ] : Finished !
======================================================================
==OK== Installation Successful
======================================================================

Pour la v11 installée depuis la bêta


================================================================================
== Jeedom 4.4.15 Atlas in Debian GNU/Linux 11 (bullseye) on aarch64/arm64/64bits
== Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
== brother v11 (2024-09-08 13:52:48) branch:beta
======================================================================
== 08/09/2024 20:57:57 == Dependencies installation for brother
======================================================================
[  5% ] : Clean apt...
[  9% ] : Clean apt : [0sec] : [  OK  ]
[ 10% ] : Update apt...
[ 19% ] : Update apt : [6sec] : [  OK  ]
[ 20% ] : Init python3 & prerequisites...
[ 31% ] : Init python3 & prerequisites : [3sec] : [  OK  ]
[ 32% ] : Init pyEnv...
** PyEnv required: 3.9.2 < 3.11 **
[ 43% ] : Init pyEnv : [0sec] : [  OK  ]
[ 44% ] : install or update PyEnv...
[ 55% ] : install or update PyEnv : [57sec] : [  OK  ]
[ 56% ] : Install Python 3.11 with PyEnv...
** python3 path: /opt/pyenv/versions/3.11.10/bin/python3 **
[ 67% ] : Install Python 3.11 with PyEnv : [8:24] : [  OK  ]
[ 68% ] : Setting up virtual environment...
** Version of python in VENV: Python 3.11.10
[ 79% ] : Setting up virtual environment : [28sec] : [  OK  ]
[ 80% ] : Install the required python packages...
[ 89% ] : Install the required python packages : [12sec] : [  OK  ]
[ 90% ] : Summary of installed packages...
brother==4.3.0
certifi==2024.8.30
cffi==1.17.1
charset-normalizer==3.3.2
cryptography==43.0.1
dacite==1.8.1
idna==3.8
Jinja2==3.1.4
MarkupSafe==2.1.5
ply==3.11
pyasn1==0.6.0
pycparser==2.22
pysmi==1.5.0
pysnmp==6.2.5
pysnmpcrypto==0.0.4
requests==2.32.3
urllib3==2.2.2
[ 99% ] : Summary of installed packages : [1sec] : [  OK  ]
[100% ] : Finished !
======================================================================
==OK== Installation Successful [10:11]
======================================================================

Je coche ta réponse comme solution ?

Hello,

Ca a l’air de s’être bien installé en v9 et en v11, donc oui, tu peux fermer le sujet :slight_smile:

En même temps, tu es passé sur Debian 11 avec une fresh install, il y avait peut de chance que ça se vautre :stuck_out_tongue:

Bad

1 « J'aime »

Si j’ai le temps je redémarre ma smart demain et je te dis si pb mais j’ai peu de doute :wink:

Te presse pas, je suis assez chargé en ce moment, je devais juste prendre peu de temps pour rendre le plugin compatible Debian 12 (depuis 3 mois).
Envoie moi un MP quand/si tu as le temps de tester, je suis toujours intéressé par vos retours.

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.