[Debian 12] error externally_managed_environment

Salut,

VM debian 12 à jour
Core Alpha 4.4.2 à jour
Plugin Beta à jour

Je précise que ceci n’est que le résultat de ma reprise de test avec Debian 12
Que je n’aie pas les compétences pour juger de l’importance et des impacts de ces logs.

Je suis juste beta :innocent: testeur :wink: :beers:

Voici le log d’install des dépendances

+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_rfxcom
+ echo 1
+ echo 2
+ sudo chmod +x /var/www/html/core/class/../../plugins/rfxcom/resources/pre-install.sh
sudo: impossible de résoudre l'hôte Wooperadeb12: Nom ou service inconnu
+ sudo /var/www/html/core/class/../../plugins/rfxcom/resources/pre-install.sh
sudo: impossible de résoudre l'hôte Wooperadeb12: Nom ou service inconnu
Launch pre-install of rfxcom dependancy
sudo: impossible de résoudre l'hôte Wooperadeb12: Nom ou service inconnu
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
sudo: impossible de résoudre l'hôte Wooperadeb12: Nom ou service inconnu
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Lecture des listes de paquets…
Construction de l'arbre des dépendances…
Lecture des informations d'état…
Le paquet « python3-serial » n'est pas installé, et ne peut donc être supprimé
Le paquet suivant a été installé automatiquement et n'est plus nécessaire :
linux-image-6.1.0-12-amd64
Veuillez utiliser « sudo apt autoremove » pour le supprimer.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
+ echo 3
++ cut -f 2-
++ awk '$1 <= 4'
++ find /usr/local/lib/python3.11/dist-packages/ -mindepth 1 -maxdepth 1 -type d -exec du -ks '{}' +
+ RESULTTODELETE=
++ sed 's, ,\ ,g'
++ echo ''
+ RESULTTODELETE2=
+ xargs rm -rf
+ echo ''
+ echo 4
+ sudo pip3 cache purge
sudo: impossible de résoudre l'hôte Wooperadeb12: Nom ou service inconnu
WARNING: No matching packages
Files removed: 0
+ echo 5
+ sudo pip3 install --upgrade pip
sudo: impossible de résoudre l'hôte Wooperadeb12: Nom ou service inconnu
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
+ echo 6
+ sudo pip3 install --force-reinstall --upgrade six
sudo: impossible de résoudre l'hôte Wooperadeb12: Nom ou service inconnu
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
+ echo 7
+ sudo pip3 install --force-reinstall --upgrade requests
sudo: impossible de résoudre l'hôte Wooperadeb12: Nom ou service inconnu
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
+ echo 8
+ sudo pip3 install --force-reinstall --upgrade setuptools
sudo: impossible de résoudre l'hôte Wooperadeb12: Nom ou service inconnu
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
+ echo 9
+ sudo pip3 install --force-reinstall --upgrade pyudev
sudo: impossible de résoudre l'hôte Wooperadeb12: Nom ou service inconnu
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
+ echo 10
+ sudo pip3 install --force-reinstall --upgrade pyserial
sudo: impossible de résoudre l'hôte Wooperadeb12: Nom ou service inconnu
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
+ echo 11
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end rfxcom
PHP Warning:  PHP Startup: Unable to load dynamic library 'mosquitto.so' (tried: /usr/lib/php/20220829/mosquitto.so (/usr/lib/php/20220829/mosquitto.so: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/mosquitto.so.so (/usr/lib/php/20220829/mosquitto.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
+ rm /tmp/jeedom_install_in_progress_rfxcom
+ echo '*******************End of package installation******************'
*******************End of package installation******************

Comme dans mes autres posts, j’ai aussi pour ce plugin

PHP Warning:  PHP Startup: Unable to load dynamic library 'mosquitto.so' (tried: /usr/lib/php/20220829/mosquitto.so (/usr/lib/php/20220829/mosquitto.so: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/mosquitto.so.so 

Bonjour,

Pour le moment le core ne supporte pas les dépendances python en debian 12

Suite à la nouvelle beta de ce matin, j’ai refait un test
Donc tjrs
VM Debian 12
Core Alpha 4.4.2
Plugin en beta

Voici le log d’install des dépendances

+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_rfxcom
+ echo 1
+ echo 2
+ sudo chmod +x /var/www/html/core/class/../../plugins/rfxcom/resources/pre-install.sh
+ sudo /var/www/html/core/class/../../plugins/rfxcom/resources/pre-install.sh
Launch pre-install of rfxcom dependancy
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
python3-serial
0 upgraded, 0 newly installed, 1 to remove and 49 not upgraded.
After this operation, 470 kB disk space will be freed.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 108749 files and directories currently installed.)
Removing python3-serial (3.5-1.1) ...
+ echo 3
+ sudo killall apt apt-get unattended-upgr
apt: no process found
apt-get: no process found
unattended-upgr: no process found
+ sudo rm /var/lib/apt/lists/lock
+ sudo rm /var/cache/apt/archives/lock
+ sudo rm /var/lib/dpkg/lock /var/lib/dpkg/lock-frontend
+ sudo sudo dpkg --configure -a --force-confdef
+ sudo apt update
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://security.debian.org/debian-security bookworm-security InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 https://deb.nodesource.com/node_16.x bookworm InRelease
Reading package lists...
Building dependency tree...
Reading state information...
49 packages can be upgraded. Run 'apt list --upgradable' to see them.
+ echo 4
+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
python3 is already the newest version (3.11.2-1+b1).
0 upgraded, 0 newly installed, 0 to remove and 49 not upgraded.
+ echo 5
+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-pip
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
python3-pip is already the newest version (23.0.1+dfsg-1).
0 upgraded, 0 newly installed, 0 to remove and 49 not upgraded.
+ echo 6
+ sudo apt install -o Dpkg::Options::=--force-confdef -y build-essential
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
build-essential is already the newest version (12.9).
0 upgraded, 0 newly installed, 0 to remove and 49 not upgraded.
+ echo 7
+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-pyudev
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
python3-pyudev is already the newest version (0.24.0-1).
0 upgraded, 0 newly installed, 0 to remove and 49 not upgraded.
+ echo 8
+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-dev
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
python3-dev is already the newest version (3.11.2-1+b1).
0 upgraded, 0 newly installed, 0 to remove and 49 not upgraded.
+ echo 9
+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-requests
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
python3-requests is already the newest version (2.28.1+dfsg-1).
0 upgraded, 0 newly installed, 0 to remove and 49 not upgraded.
+ echo 10
+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-setuptools
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
python3-setuptools is already the newest version (66.1.1-1).
0 upgraded, 0 newly installed, 0 to remove and 49 not upgraded.
+ echo 11
+ sudo apt update
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 http://security.debian.org/debian-security bookworm-security InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 https://deb.nodesource.com/node_16.x bookworm InRelease
Reading package lists...
Building dependency tree...
Reading state information...
49 packages can be upgraded. Run 'apt list --upgradable' to see them.
+ sudo apt install -y pipx
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
pipx is already the newest version (1.1.0-1).
0 upgraded, 0 newly installed, 0 to remove and 49 not upgraded.
+ echo 12
+ sudo pipx install --force-reinstall --upgrade six
usage: pipx [-h] [--version]
{install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions}
...
pipx: error: unrecognized arguments: --force-reinstall --upgrade
+ echo 13
+ sudo pipx install --force-reinstall --upgrade requests
usage: pipx [-h] [--version]
{install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions}
...
pipx: error: unrecognized arguments: --force-reinstall --upgrade
+ echo 14
+ sudo pipx install --force-reinstall --upgrade setuptools
usage: pipx [-h] [--version]
{install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions}
...
pipx: error: unrecognized arguments: --force-reinstall --upgrade
+ echo 15
+ sudo pipx install --force-reinstall --upgrade pyudev
usage: pipx [-h] [--version]
{install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions}
...
pipx: error: unrecognized arguments: --force-reinstall --upgrade
+ echo 16
+ sudo pipx install --force-reinstall --upgrade pyserial
usage: pipx [-h] [--version]
{install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions}
...
pipx: error: unrecognized arguments: --force-reinstall --upgrade
+ echo 17
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end rfxcom
+ echo 18
+ rm /tmp/jeedom_install_in_progress_rfxcom
+ echo '*******************End of package installation******************'
*******************End of package installation******************

Seul les paramètres passés (force reinstall) à pipx semblent poser souci à présent

+ sudo pipx install --force-reinstall --upgrade six
usage: pipx [-h] [--version]
{install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions}
...

Bonjour
Oui pour le moment jeedom ne supportera pas debian 12 pour tous les plugins rfxcom. Ça sera revu après la sortie de la 4.4

Bonjour à tous,
Auriez vous des nouvelles sur cette implémentation s’i vous plaît ?
Je suis en debian 12 et mon rfxcom est HS, avec le même problème pipx.

Merci d’avance

Debian 12.5
Jeedom 4.4.5
Pip 24.0
Python 3.11

Bonjour,
Le code a été fait mais nous n’avons pas encore decidé de date pour l’integrer en alpha, pas sur que ca soit en 4.4 a mon avis ca sera plutot 4.5. Vous pouvez suivre l’avancement la Pip on debian 12 by zoic21 · Pull Request #2566 · jeedom/core (github.com)

1 « J'aime »

C’est bien dommage j’aurai bien continué les tests sur l’alpha sur Debian 12 maintenant que la 4.4 est en stable depuis quelques temps.

Je comprends j’ai essayé de le faire passer en 4.4 mais c’est pas moi qui décide

1 « J'aime »

merci beaucoup pour la réponse

j’ai quand mem reussi à relancer mon plugin en forçant l’installation pyserial avec cette commande: (trouvé dans le fichier install_apt.sh du plugin RFXcom)

python3 -m pip install --force-reinstall  --ignore-installed --no-cache-dir pyserial

les dépendances sont passées à OK, j’ai pu relancer mon daemon…
mais après je me sui retrouvé avec l’erreur

0050|[2024-02-17 12:18:38]ERROR : Error on send info to Jeedom : module ‹ collections › has no attribute ‹ Mapping ›

que j’ai voulu essayer de corriger comme @Dok_7 …et là ce fut le drame :crazy_face:
j’ai déchiré mon fichier jeedom.py du plugin RFXcom (j’ai pas penser à le sauvegarder avant)…et là je ne peux plus lancer mon daemon car j’ai mis le bordel avec les espaces… un vrai boulet :drooling_face:

pour le moment je continue mes tests!

Suffit de réinstaller le plugin…

mon daemon fonctionne maintenant que j’ai réparé mon fichier jeedom.py
mmmhhh: ça ne fonctionne pas, j’ai essayé (je ne sais pas si c’est lié au fait que je sous debian 12?)

Oui
L’info a déjà été donnée

il fonctionne de nouveau chez moi, avec les modifs que j’indique dans un autre post! En attendant la vrai correction qui arrivera comme l’indique @Loic

Plus besoin de modif avec la derniere version du core / plugin. Le demon est OK

salut, j’ai eu de l’espoir, j’ai repoussé la maj de rfxcomj…et maintenant, ça ne fonctionne plus!
rah cette manie de vouloir faire les maj quand tout fonctionne!!!
du coup ça ne fonctionne plus!

0000|Traceback (most recent call last):
0001|File « /var/www/html/plugins/rfxcom/resources/rfxcomd/rfxcomd.py », line 23, in
0002|from jeedomdaemon.base_config import BaseConfig
0003|ModuleNotFoundError: No module named ‹ jeedomdaemon ›

Du coup je ne suis pas contre un peu d’aide s’il vous plaît :grin:
'`

auto-réponse en cherchant 3 sec:

Désolé

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