Installation des dépendances KO: error: can't find Rust compiler

Bonjour à tous,

Depuis la dernière MAJ, je n’arrive plus à installer les dépendances de Xiaomi Home.
Je pense que ça fait un moment, que mais vu que maintenant il y a les dependances en gestion automatique, c’est remonté dans le centre de message :slight_smile:

Le démon est OK.

Rien de spécial dans les logs xiaomihome_dep

********************************************************
*             Installation des dépendances             *
********************************************************
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists...
Installation des dépendances apt
Reading package lists...
Building dependency tree...
Reading state information...
libffi-dev is already the newest version (3.2.1-9).
python-cryptography is already the newest version (2.6.1-3+deb10u2).
python-cryptography set to manually installed.
python-dev is already the newest version (2.7.16-1).
libssl-dev is already the newest version (1.1.1d-0+deb10u6+rpt1).
python-pip is already the newest version (18.1-5+rpt1).
The following package was automatically installed and is no longer required:
raspi-gpio
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Installation du module construct pour python
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting construct
Downloading https://files.pythonhosted.org/packages/30/2f/e2e6bad1b80f744cf5c2a6d622e3dee698b43e6c040f980ae0ac0edd5e54/construct-2.10.54.tar.gz (55kB)
Building wheels for collected packages: construct
Running setup.py bdist_wheel for construct: started
Running setup.py bdist_wheel for construct: finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/7a/40/3b/25a36d42a9b8a2d46c1db8b7623865202b811d3e76f9d0b84a
Successfully built construct
Installing collected packages: construct
Successfully installed construct-2.10.54
Installation du module pyudev pour python
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyudev
Downloading https://files.pythonhosted.org/packages/72/c8/4660d815a79b1d42c409012aaa10ebd6b07a47529b4cb6880f27a24bd646/pyudev-0.22.0.tar.gz (85kB)
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from pyudev) (1.12.0)
Building wheels for collected packages: pyudev
Running setup.py bdist_wheel for pyudev: started
Running setup.py bdist_wheel for pyudev: finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/39/fd/ac/f5251065fe762db2ef2c619c9113fb8c96b07ddb37ee85fd63
Successfully built pyudev
Installing collected packages: pyudev
Successfully installed pyudev-0.22.0
Installation du module pyserial pour python
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyserial
Downloading https://files.pythonhosted.org/packages/07/bc/587a445451b253b285629263eb51c2d8e9bcea4fc97826266d186f96f558/pyserial-3.5-py2.py3-none-any.whl (90kB)
Installing collected packages: pyserial
Successfully installed pyserial-3.5
Installation du module future pour python
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting future
Downloading https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz (829kB)
Building wheels for collected packages: future
Running setup.py bdist_wheel for future: started
Running setup.py bdist_wheel for future: finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/8b/99/a0/81daf51dcd359a9377b110a8a886b3895921802d2fc1b2397e
Successfully built future
Installing collected packages: future
Successfully installed future-0.18.2
Installation du module enum-compat pour python
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting enum-compat
Downloading https://files.pythonhosted.org/packages/41/46/8ed2368976d934652d8f33f1fdd86f5580fab45e890c90a848e83097a093/enum-compat-0.0.3.tar.gz
Requirement already satisfied: enum34 in /usr/lib/python2.7/dist-packages (from enum-compat) (1.1.6)
Building wheels for collected packages: enum-compat
Running setup.py bdist_wheel for enum-compat: started
Running setup.py bdist_wheel for enum-compat: finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/2f/60/6f/6b24ecbc75f5f6f62f598c5c705eee9381e6b9790ff400c575
Successfully built enum-compat
Installing collected packages: enum-compat
Successfully installed enum-compat-0.0.3
********************************************************
*             Installation terminée                    *
********************************************************

par contre, dans xiaomihome_packages

[...]
copying src/cryptography/hazmat/bindings/_rust/x509.pyi -> build/lib.linux-armv7l-cpython-37/cryptography/hazmat/bindings/_rust
running build_ext
running build_rust
/tmp/pip-build-env-n7bku5db/overlay/lib/python3.7/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'cryptography.hazmat.bindings._rust' as data is deprecated, please list it in `packages`.
!!
############################
# Package would be ignored #
############################
Python recognizes 'cryptography.hazmat.bindings._rust' as an importable package,
but it is not listed in the `packages` configuration of setuptools.
'cryptography.hazmat.bindings._rust' has been automatically added to the distribution only
because it may contain data files, but this behavior is likely to change
in future versions of setuptools (and therefore is considered deprecated).
Please make sure that 'cryptography.hazmat.bindings._rust' is included as a package by using
the `packages` configuration field or the proper discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).
You can read more about "package discovery" and "data files" on setuptools
documentation page.
!!
check.warn(importable)
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation/ for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq/
4) Ensure you have a recent Rust toolchain installed:
https://cryptography.io/en/latest/installation/#rust
Python: 3.7.3
platform: Linux-5.10.63-v7+-armv7l-with-debian-10.11
pip: n/a
setuptools: 65.5.0
setuptools_rust: 1.5.2
rustc: n/a
=============================DEBUG ASSISTANCE=============================
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
This package requires Rust >=1.48.0.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects
+ echo 6
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end xiaomihome
+ rm /tmp/jeedom_install_in_progress_xiaomihome
+ echo '*******************End of package installation******************'
*******************End of package installation******************

Ca semble être lié à pip, python, la cryptographie…des idées ? :slight_smile:
Merci d’avance.

Il y a un autre sujet qui traite de ce problème

Bonjour,

Après avoir essayé 1000 méthodes différentes, voici celle qui a fonctionné.
Je n’ai rien compris à ce que j’ai fait, mais en suivant minutieusement chaque étape, tout est revenu dans l’ordre, donc un grand merci @GreenSkol (et en effet, la compilation a pris une bonne demi-heure CPU à fond)

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