[Debian12] Dépendances NOK

Sur VM Debian12 à jour

Core alpha installé après avoir récupéré le script via wget

Quelques plugins installés pour tester si OK

La j’installe RFXCom pour tester justement

Les dépendances sont Nok

0000|+ echo '*******************Begin of package installation******************'
0001|*******************Begin of package installation******************
0002|+ touch /tmp/jeedom_install_in_progress_rfxcom
0003|+ echo 1
0004|+ echo 2
0005|+ sudo chmod +x /var/www/html/core/class/../../plugins/rfxcom/resources/pre-install.sh
0006|+ sudo /var/www/html/core/class/../../plugins/rfxcom/resources/pre-install.sh
0007|Launch pre-install of rfxcom dependancy
0008|error: externally-managed-environment
0009|× This environment is externally managed
0010|╰─> To install Python packages system-wide, try apt install
0011|python3-xyz, where xyz is the package you are trying to
0012|install.
0013|If you wish to install a non-Debian-packaged Python package,
0014|create a virtual environment using python3 -m venv path/to/venv.
0015|Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
0016|sure you have python3-full installed.
0017|If you wish to install a non-Debian packaged Python application,
0018|it may be easiest to use pipx install xyz, which will manage a
0019|virtual environment for you. Make sure you have pipx installed.
0020|See /usr/share/doc/python3.11/README.venv for more information.
0021|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.
0022|hint: See PEP 668 for the detailed specification.
0023|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0024|Reading package lists...
0025|Building dependency tree...
0026|Reading state information...
0027|Package 'python3-serial' is not installed, so not removed
0028|0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
0029|+ echo 3
0030|+ sudo apt update
0031|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0032|Hit:1 http://deb.debian.org/debian bookworm InRelease
0033|Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
0034|Hit:3 http://security.debian.org/debian-security bookworm-security InRelease
0035|Hit:4 https://deb.nodesource.com/node_16.x bookworm InRelease
0036|Reading package lists...
0037|Building dependency tree...
0038|Reading state information...
0039|All packages are up to date.
0040|+ echo 4
0041|+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3
0042|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0043|Reading package lists...
0044|Building dependency tree...
0045|Reading state information...
0046|python3 is already the newest version (3.11.2-1+b1).
0047|0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
0048|+ echo 5
0049|+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-pip
0050|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0051|Reading package lists...
0052|Building dependency tree...
0053|Reading state information...
0054|python3-pip is already the newest version (23.0.1+dfsg-1).
0055|0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
0056|+ echo 6
0057|+ sudo apt install -o Dpkg::Options::=--force-confdef -y build-essential
0058|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0059|Reading package lists...
0060|Building dependency tree...
0061|Reading state information...
0062|build-essential is already the newest version (12.9).
0063|0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
0064|+ echo 7
0065|+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-pyudev
0066|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0067|Reading package lists...
0068|Building dependency tree...
0069|Reading state information...
0070|python3-pyudev is already the newest version (0.24.0-1).
0071|0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
0072|+ echo 8
0073|+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-dev
0074|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0075|Reading package lists...
0076|Building dependency tree...
0077|Reading state information...
0078|python3-dev is already the newest version (3.11.2-1+b1).
0079|0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
0080|+ echo 9
0081|+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-requests
0082|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0083|Reading package lists...
0084|Building dependency tree...
0085|Reading state information...
0086|python3-requests is already the newest version (2.28.1+dfsg-1).
0087|0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
0088|+ echo 10
0089|+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-setuptools
0090|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0091|Reading package lists...
0092|Building dependency tree...
0093|Reading state information...
0094|python3-setuptools is already the newest version (66.1.1-1).
0095|0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
0096|+ echo 11
0097|++ cut -f 2-
0098|++ awk '$1 <= 4'
0099|++ find /usr/local/lib/python3.11/dist-packages/ -mindepth 1 -maxdepth 1 -type d -exec du -ks '{}' +
0100|+ RESULTTODELETE=
0101|++ sed 's, ,\ ,g'
0102|++ echo ''
0103|+ RESULTTODELETE2=
0104|+ xargs rm -rf
0105|+ echo ''
0106|+ echo 12
0107|+ sudo pip3 cache purge
0108|WARNING No matching packages
0109|Files removed: 0
0110|+ echo 13
0111|+ sudo pip3 install --upgrade pip
0112|error: externally-managed-environment
0113|× This environment is externally managed
0114|╰─> To install Python packages system-wide, try apt install
0115|python3-xyz, where xyz is the package you are trying to
0116|install.
0117|If you wish to install a non-Debian-packaged Python package,
0118|create a virtual environment using python3 -m venv path/to/venv.
0119|Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
0120|sure you have python3-full installed.
0121|If you wish to install a non-Debian packaged Python application,
0122|it may be easiest to use pipx install xyz, which will manage a
0123|virtual environment for you. Make sure you have pipx installed.
0124|See /usr/share/doc/python3.11/README.venv for more information.
0125|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.
0126|hint: See PEP 668 for the detailed specification.
0127|+ echo 14
0128|+ sudo pip3 install --force-reinstall --upgrade six
0129|error: externally-managed-environment
0130|× This environment is externally managed
0131|╰─> To install Python packages system-wide, try apt install
0132|python3-xyz, where xyz is the package you are trying to
0133|install.
0134|If you wish to install a non-Debian-packaged Python package,
0135|create a virtual environment using python3 -m venv path/to/venv.
0136|Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
0137|sure you have python3-full installed.
0138|If you wish to install a non-Debian packaged Python application,
0139|it may be easiest to use pipx install xyz, which will manage a
0140|virtual environment for you. Make sure you have pipx installed.
0141|See /usr/share/doc/python3.11/README.venv for more information.
0142|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.
0143|hint: See PEP 668 for the detailed specification.
0144|+ echo 15
0145|+ sudo pip3 install --force-reinstall --upgrade requests
0146|error: externally-managed-environment
0147|× This environment is externally managed
0148|╰─> To install Python packages system-wide, try apt install
0149|python3-xyz, where xyz is the package you are trying to
0150|install.
0151|If you wish to install a non-Debian-packaged Python package,
0152|create a virtual environment using python3 -m venv path/to/venv.
0153|Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
0154|sure you have python3-full installed.
0155|If you wish to install a non-Debian packaged Python application,
0156|it may be easiest to use pipx install xyz, which will manage a
0157|virtual environment for you. Make sure you have pipx installed.
0158|See /usr/share/doc/python3.11/README.venv for more information.
0159|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.
0160|hint: See PEP 668 for the detailed specification.
0161|+ echo 16
0162|+ sudo pip3 install --force-reinstall --upgrade setuptools
0163|error: externally-managed-environment
0164|× This environment is externally managed
0165|╰─> To install Python packages system-wide, try apt install
0166|python3-xyz, where xyz is the package you are trying to
0167|install.
0168|If you wish to install a non-Debian-packaged Python package,
0169|create a virtual environment using python3 -m venv path/to/venv.
0170|Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
0171|sure you have python3-full installed.
0172|If you wish to install a non-Debian packaged Python application,
0173|it may be easiest to use pipx install xyz, which will manage a
0174|virtual environment for you. Make sure you have pipx installed.
0175|See /usr/share/doc/python3.11/README.venv for more information.
0176|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.
0177|hint: See PEP 668 for the detailed specification.
0178|+ echo 17
0179|+ sudo pip3 install --force-reinstall --upgrade pyudev
0180|error: externally-managed-environment
0181|× This environment is externally managed
0182|╰─> To install Python packages system-wide, try apt install
0183|python3-xyz, where xyz is the package you are trying to
0184|install.
0185|If you wish to install a non-Debian-packaged Python package,
0186|create a virtual environment using python3 -m venv path/to/venv.
0187|Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
0188|sure you have python3-full installed.
0189|If you wish to install a non-Debian packaged Python application,
0190|it may be easiest to use pipx install xyz, which will manage a
0191|virtual environment for you. Make sure you have pipx installed.
0192|See /usr/share/doc/python3.11/README.venv for more information.
0193|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.
0194|hint: See PEP 668 for the detailed specification.
0195|+ echo 18
0196|+ sudo pip3 install --force-reinstall --upgrade pyserial
0197|error: externally-managed-environment
0198|× This environment is externally managed
0199|╰─> To install Python packages system-wide, try apt install
0200|python3-xyz, where xyz is the package you are trying to
0201|install.
0202|If you wish to install a non-Debian-packaged Python package,
0203|create a virtual environment using python3 -m venv path/to/venv.
0204|Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
0205|sure you have python3-full installed.
0206|If you wish to install a non-Debian packaged Python application,
0207|it may be easiest to use pipx install xyz, which will manage a
0208|virtual environment for you. Make sure you have pipx installed.
0209|See /usr/share/doc/python3.11/README.venv for more information.
0210|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.
0211|hint: See PEP 668 for the detailed specification.
0212|+ echo 19
0213|+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end rfxcom
0214|+ rm /tmp/jeedom_install_in_progress_rfxcom
0215|+ echo '*******************End of package installation******************'
0216|*******************End of package installation******************

Salut,

ca sera le cas avec tous les plugins utilisant pip(3) comme gestionnaire de paquet pour les lib python sans utiliser de venv; donc beaucoup de plugins python vont avoir ce problème

c’est obligatoire d’avoir un venv ou alors il faut utiliser pipx qui gère ca pour nous.

Merci @Mips , le problème c’est que pipx réclame python en v3.7 mini. Pour être certain que ça fonctionne pour tous il vaudrait mieux utiliser venv?

avec venv ca sera pareil, il faut python3.7 mais je ne vois pas en quoi c’est un problème;
buster (debian10) vient avec python3.7 et pour bien faire on ne devrait déjà plus le supporter (mais obligé car smart & atlas sous debian10) => jeedom c’est minimum debian 10

stretch venait avec python3.4 et celui là il ne faut plus supporter.

le « problème » est plus entre debian12 & debian10/11 car sur debian 12… on ne peut pas utiliser pip pour installer pipx puisqu’on ne devrait plus utiliser pip du tout => pas grave le paquet est dispo sur les repo apt
mais il ne l’est pas pour debian10/11

moi j’ai fait +/- ceci:

read -d . VERSION < /etc/debian_version
echo "Version debian:${VERSION}"
if [ ${VERSION} == '12' ]; then
	echo "Install pipx via apt"
	apt-get install -y pipx
else
	echo "Install pipx via pip"
	python3 -m pip install pipx
fi
pipx ensurepath
pipx install -r requirements.txt

sinon avec un venv ca va donner +/- ceci (en supposant qu’on lance le script d’install dans le dossier « resources »:

BASE_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
VENV_DIR=$BASE_DIR/venv
cd $BASE_DIR

apt-get install -y python3 python3-pip python3-setuptools python3-dev python3-venv
python3 -m venv $VENV_DIR
$VENV_DIR/bin/python3 -m pip install --upgrade pip wheel
$VENV_DIR/bin/python3 -m pip install -r requirements.txt
1 « J'aime »

Merci @Mips , je vais étudier tout ça avec un grand intérêt