Aws-iot-device-sdk-python-v2: Problèmes avec l'installation

Créé le 13 oct. 2020  ·  16Commentaires  ·  Source: aws/aws-iot-device-sdk-python-v2

Après avoir examiné la plupart des problèmes résolus de cette page, il y a plusieurs discussions sur ce problème, mais aucun ne le résout pour moi.

Quand j'essaye d'installer soit avec
python3 -m pip install awsiotsdk ou
git clone https://github.com/aws/aws-iot-device-sdk-python-v2.git
python3 -m pip install ./aws-iot-device-sdk-python-v2

j'obtiens ceci :


Collecte d'awsiotsdk
Utilisation du cache awsiotsdk-1.5.1-py3-none-any.whl (18 ko)
Collecte awscrt==0.9.3
Utilisation du cache awscrt-0.9.3.tar.gz (2,5 Mo)
Roues de construction pour les colis collectés : awscrt
Roue de construction pour awscrt (setup.py) ... erreur
ERREUR : La commande est sortie en erreur avec l'état de sortie 1 :
commande : /usr/bin/python3 -u -c 'import sys, setuptools, tokenize ; sys.argv[0] = '"'"'/tmp/pip-install-un4mvgep/awscrt/setup.py'"'"'; __file__='"'"'/tmp/pip-install-un4mvgep/awscrt/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__) ;code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile( code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-s5x44slu
cwd : /tmp/pip-install-un4mvgep/awscrt/
Sortie complète (112 lignes) :
exécuter bdist_wheel
construction en cours
exécuter build_py
création de build
création de build/lib.linux-aarch64-3.6
création de build/lib.linux-aarch64-3.6/awscrt
copier awscrt/auth.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/crypto.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/http.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/io.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/mqtt.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/__init__.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/exceptions.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-aarch64-3.6/awscrt
exécuter build_ext
cmake version 3.10.2

Suite CMake maintenue et prise en charge par Kitware (kitware.com/cmake).
--- Dépendance du bâtiment : s2n (RelWithDebInfo) ---
cmake -DCMAKE_PREFIX_PATH=/tmp/pip-install-un4mvgep/awscrt/build/deps/install -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-un4mvgep/awscrt/build/deps/install -DBUITYLD_SHARED_LIBS_LIBS=OFF OFF -DCMAKE_INCLUDE_PATH=\"/usr/include/python3.6m\" -DLibCrypto_INCLUDE_DIR=/tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/include -DLibCrypto_STATIC_LIBRARY=/install-tmp/awscrt/build/deps/libcrypto/include -DLibCrypto_STATIC_LIBRARY=/install-tmp/awp /build/deps/libcrypto/lib/libcrypto.a /tmp/pip-install-un4mvgep/awscrt/crt/s2n
-- L'identification du compilateur C est GNU 7.5.0
-- Vérifiez que le compilateur C fonctionne : /usr/bin/cc
-- Vérifiez que le compilateur C fonctionne : /usr/bin/cc -- fonctionne
-- Détection des informations ABI du compilateur C
-- Détection des informations ABI du compilateur C - terminé
-- Détection des fonctionnalités de compilation C
-- Détection des fonctionnalités de compilation C - terminé
-- Recherche de pthread.h
-- Recherche de pthread.h - trouvé
-- Recherche de pthread_create
-- Recherche pthread_create - introuvable
-- Vérifiez si le compilateur accepte -pthread
-- Vérifiez si le compilateur accepte -pthread - yes
-- Threads trouvés : VRAI
-- Tentative de try_compile PQ ASM
-- L'identification du compilateur ASM est GNU
-- Assembleur trouvé : /usr/bin/cc
-- Échec de try_compile PQ ASM - utilisation du code C générique pour la cryptographie PQ
-- Exécution du test S2N_HAVE_EXECINFO
-- Exécution du test S2N_HAVE_EXECINFO - Succès
-- LibCrypto trouvé : /tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/lib/libcrypto.a
-- Répertoire d'inclusion de LibCrypto : /tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/include
-- LibCrypto Shared Lib : /usr/lib/aarch64-linux-gnu/libcrypto.so
-- LibCrypto Static Lib : /tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/lib/libcrypto.a
-- Configuration terminée
Erreur CMake sur CMakeLists. txt:191 (add_library):
Cibler les liens "s2n" vers la cible "LibCrypto::Crypto" mais la cible n'était pas
trouvé. Peut-être qu'un appel find_package() est manquant pour une cible IMPORTÉE, ou
une cible ALIAS est manquante ?

Erreur CMake sur CMakeLists. txt:239 (target_include_directories):
Erreur lors de l'évaluation de l'expression du générateur :

  $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

Target "LibCrypto::Crypto" not found.

Erreur CMake sur CMakeLists. txt:239 (target_include_directories):
Erreur lors de l'évaluation de l'expression du générateur :

  $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

Target "LibCrypto::Crypto" not found.

Erreur CMake sur CMakeLists. txt:191 (add_library):
Cibler les liens "s2n" vers la cible "LibCrypto::Crypto" mais la cible n'était pas
trouvé. Peut-être qu'un appel find_package() est manquant pour une cible IMPORTÉE, ou
une cible ALIAS est manquante ?

-- Génération terminée
Avertissement CMake :
Les variables spécifiées manuellement n'ont pas été utilisées par le projet :

  CMAKE_INCLUDE_PATH

-- Les fichiers de compilation ont été écrits dans : /tmp/pip-install-un4mvgep/awscrt/build/deps/s2n
Traceback (appel le plus récent en dernier) :
Déposer "", ligne 1, dans
Fichier "/tmp/pip-install-un4mvgep/awscrt/setup.py", ligne 263, dans
'boto3'
Fichier "/usr/lib/python3/dist-packages/setuptools/__init__.py", ligne 129, dans la configuration
retourner distutils.core.setup(**attrs)
Fichier "/usr/lib/python3.6/distutils/core.py", ligne 148, dans la configuration
dist.run_commands()
Fichier "/usr/lib/python3.6/distutils/dist.py", ligne 955, dans run_commands
self.run_command(cmd)
Fichier "/usr/lib/python3.6/distutils/dist.py", ligne 974, dans run_command
cmd_obj.run()
Fichier "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", ligne 204, en cours d'exécution
self.run_command('construire')
Fichier "/usr/lib/python3.6/distutils/cmd.py", ligne 313, dans run_command
self.distribution.run_command(commande)
Fichier "/usr/lib/python3.6/distutils/dist.py", ligne 974, dans run_command
cmd_obj.run()
Fichier "/usr/lib/python3.6/distutils/command/build.py", ligne 135, en cours d'exécution
self.run_command(cmd_name)
Fichier "/usr/lib/python3.6/distutils/cmd.py", ligne 313, dans run_command
self.distribution.run_command(commande)
Fichier "/usr/lib/python3.6/distutils/dist.py", ligne 974, dans run_command
cmd_obj.run()
Fichier "/tmp/pip-install-un4mvgep/awscrt/setup.py", ligne 179, en cours d'exécution
self._build_dependency(lib)
Fichier "/tmp/pip-install-un4mvgep/awscrt/setup.py", ligne 162, dans _build_dependency
sous-processus.check_call(cmake_args)
Fichier "/usr/lib/python3.6/subprocess.py", ligne 311, dans check_call
augmenter CalledProcessError(retcode, cmd)
subprocess.CalledProcessError : commande '['cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-un4mvgep/awscrt/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-un4/mvgepaw/ deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_INCLUDE_PATH="/usr/include/python3.6m"', '-DLibDE_TEST_INCLUDE_INPI= -install-un4mvgep/awscrt/build/deps/libcrypto/include', '-DLibCrypto_STATIC_LIBRARY=/tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/lib/libcrypto.a', '/tmp/pip- install-un4mvgep/awscrt/crt/s2n']' a renvoyé un état de sortie différent de zéro 1.


ERREUR : Échec de la création de la roue pour awscrt
Exécution de setup.py clean pour awscrt
Échec de la création d'awscrt
Installation des packages collectés : awscrt, awsiotsdk
Exécution de l'installation setup.py pour awscrt ... erreur
ERREUR : La commande est sortie en erreur avec l'état de sortie 1 :
commande : /usr/bin/python3 -u -c 'import sys, setuptools, tokenize ; sys.argv[0] = '"'"'/tmp/pip-install-un4mvgep/awscrt/setup.py'"'"'; __file__='"'"'/tmp/pip-install-un4mvgep/awscrt/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__) ;code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile( code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-mbraawb4/install-record.txt --single-version-externally-managed --user -- prefix= --compile --install-headers /home/grabitinigo/.local/include/python3.6m/awscrt
cwd : /tmp/pip-install-un4mvgep/awscrt/
Sortie complète (88 lignes) :
installation en cours
construction en cours
exécuter build_py
création de build/lib.linux-aarch64-3.6
création de build/lib.linux-aarch64-3.6/awscrt
copier awscrt/auth.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/crypto.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/http.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/io.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/mqtt.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/__init__.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/exceptions.py -> build/lib.linux-aarch64-3.6/awscrt
copier awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-aarch64-3.6/awscrt
exécuter build_ext
cmake version 3.10.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
--- Building dependency: s2n (RelWithDebInfo) ---
cmake -DCMAKE_PREFIX_PATH=/tmp/pip-install-un4mvgep/awscrt/build/deps/install -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-un4mvgep/awscrt/build/deps/install -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCMAKE_INCLUDE_PATH=\"/usr/include/python3.6m\" -DLibCrypto_INCLUDE_DIR=/tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/include -DLibCrypto_STATIC_LIBRARY=/tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/lib/libcrypto.a /tmp/pip-install-un4mvgep/awscrt/crt/s2n
-- Attempting to try_compile PQ ASM
-- PQ ASM try_compile failed - using generic C code for PQ crypto
-- LibCrypto Include Dir: /tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/include
-- LibCrypto Shared Lib:  /usr/lib/aarch64-linux-gnu/libcrypto.so
-- LibCrypto Static Lib:  /tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/lib/libcrypto.a
-- Configuring done
CMake Error at CMakeLists.txt:191 (add_library):
  Target "s2n" links to target "LibCrypto::Crypto" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


CMake Error at CMakeLists.txt:239 (target_include_directories):
  Error evaluating generator expression:

    $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

  Target "LibCrypto::Crypto" not found.


CMake Error at CMakeLists.txt:239 (target_include_directories):
  Error evaluating generator expression:

    $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

  Target "LibCrypto::Crypto" not found.


CMake Error at CMakeLists.txt:191 (add_library):
  Target "s2n" links to target "LibCrypto::Crypto" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


-- Generating done
-- Build files have been written to: /tmp/pip-install-un4mvgep/awscrt/build/deps/s2n
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-un4mvgep/awscrt/setup.py", line 263, in <module>
    'boto3'
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
    self.run_command('build')
  File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/tmp/pip-install-un4mvgep/awscrt/setup.py", line 179, in run
    self._build_dependency(lib)
  File "/tmp/pip-install-un4mvgep/awscrt/setup.py", line 162, in _build_dependency
    subprocess.check_call(cmake_args)
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-un4mvgep/awscrt/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-un4mvgep/awscrt/build/deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_INCLUDE_PATH="/usr/include/python3.6m"', '-DLibCrypto_INCLUDE_DIR=/tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/include', '-DLibCrypto_STATIC_LIBRARY=/tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/lib/libcrypto.a', '/tmp/pip-install-un4mvgep/awscrt/crt/s2n']' returned non-zero exit status 1.
----------------------------------------

ERREUR : erreur de commande avec l'état de sortie 1 : /usr/bin/python3 -u -c 'import sys, setuptools, tokenize ; sys.argv[0] = '"'"'/tmp/pip-install-un4mvgep/awscrt/setup.py'"'"'; __file__='"'"'/tmp/pip-install-un4mvgep/awscrt/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__) ;code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile( code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-mbraawb4/install-record.txt --single-version-externally-managed --user -- prefix= --compile --install-headers /home/grabitinigo/.local/include/python3.6m/awscrt Vérifiez les journaux pour la sortie complète de la commande.


J'ai essayé d'exécuter avec ou sans sudo -H.
Merci pour l'aide.

bug

Tous les 16 commentaires

Quel OS utilisez-vous ? Quelle version d'openssl as-tu installé ? Pour obtenir la version SSL ouverte, utilisez openssl version -a

Avez-vous également essayé ce qui suit :

Problèmes d'installation

awsiotsdk dépend d'awscrt, qui utilise des extensions C. Les roues précompilées sont téléchargées lors de l'installation sur les principales plates-formes (Mac, Windows, Linux, Raspbian. Si les roues ne sont pas disponibles pour votre plate-forme, votre machine doit compiler certaines bibliothèques C. Si vous rencontrez des problèmes, installez ce qui suit et réessayez :

sudo apt-get mise à jour
sudo apt-get install cmake
sudo apt-get install libssl-dev

J'ai exactement le même problème dans Ubuntu 20.04 / aarch64 / Python 3.8 / OpenSSL 1.1.1f .

J'ai déjà essayé cela et mon appareil est un Jetson nano. J'ai installé OpenSSL 1.1.1 et j'ai essayé d'installer avec sudo -H python3 -m pip install awsiotsdk==1.5.0 et cela a fonctionné, donc je suppose que c'est un problème avec la dernière version

Avez-vous également essayé ce qui suit :

Problèmes d'installation
awsiotsdk dépend d'awscrt, qui utilise des extensions C. Les roues précompilées sont téléchargées lors de l'installation sur les principales plates-formes (Mac, Windows, Linux, Raspbian. Si les roues ne sont pas disponibles pour votre plate-forme, votre machine doit compiler certaines bibliothèques C. Si vous rencontrez des problèmes, installez ce qui suit et réessayez :
sudo apt-get mise à jour
sudo apt-get install cmake
sudo apt-get install libssl-dev

En suivant les mêmes étapes que @Sanrro10 mais avec un Raspberry Pi, je rencontre le même problème. Le retour à la v1.5.0 a fonctionné. Certainement un problème avec la v1.5.1.

Nous travaillons actuellement sur un correctif, mais cela ne devrait affecter que les plates-formes ARM. Pour l'instant, comme @Sanrro10 l'a compris, vous pouvez simplement utiliser la version précédente 1.5.0. Je mettrai à jour ce problème après la publication du correctif.

Je vois le même problème lors de l'installation d'une application avec awsiotsdk en tant que dépendance dans un conteneur docker trivial.

  Building wheel for awscrt (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-74gwxf0s/awscrt/setup.py'"'"'; __file__='"'"'/tmp/pip-install-74gwxf0s/awscrt/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-jum46of1
       cwd: /tmp/pip-install-74gwxf0s/awscrt/
  Complete output (130 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/awscrt
  copying awscrt/__init__.py -> build/lib.linux-x86_64-3.8/awscrt
  copying awscrt/io.py -> build/lib.linux-x86_64-3.8/awscrt
  copying awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-x86_64-3.8/awscrt
  copying awscrt/crypto.py -> build/lib.linux-x86_64-3.8/awscrt
  copying awscrt/http.py -> build/lib.linux-x86_64-3.8/awscrt
  copying awscrt/auth.py -> build/lib.linux-x86_64-3.8/awscrt
  copying awscrt/exceptions.py -> build/lib.linux-x86_64-3.8/awscrt
  copying awscrt/mqtt.py -> build/lib.linux-x86_64-3.8/awscrt
  running build_ext
  cmake version 3.13.4

  CMake suite maintained and supported by Kitware (kitware.com/cmake).
  --- Building dependency: s2n (RelWithDebInfo) ---
  cmake -DCMAKE_PREFIX_PATH=/tmp/pip-install-74gwxf0s/awscrt/build/deps/install -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-74gwxf0s/awscrt/build/deps/install -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCMAKE_INCLUDE_PATH=\"/usr/local/include/python3.8\" -DCMAKE_LIBRARY_PATH=\"/usr/local/lib\" -DLibCrypto_INCLUDE_DIR=/tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/include -DLibCrypto_STATIC_LIBRARY=/tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/lib/libcrypto.a /tmp/pip-install-74gwxf0s/awscrt/crt/s2n
  -- The C compiler identification is GNU 8.3.0
  -- Check for working C compiler: /usr/bin/cc
  -- Check for working C compiler: /usr/bin/cc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Looking for pthread_create
  -- Looking for pthread_create - not found
  -- Check if compiler accepts -pthread
  -- Check if compiler accepts -pthread - yes
  -- Found Threads: TRUE
  -- Attempting to try_compile PQ ASM
  -- The ASM compiler identification is GNU
  -- Found assembler: /usr/bin/cc
  -- PQ ASM try_compile succeeded - using optimized x86_64 assembly for PQ crypto
  -- Attempting to try_compile PQ ASM with ADX support
  -- PQ ASM try_compile with ADX support succeeded - using ASM code with ADX instructions
  -- Performing Test S2N_HAVE_EXECINFO
  -- Performing Test S2N_HAVE_EXECINFO - Success
  -- Found LibCrypto: /tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/lib/libcrypto.a
  -- LibCrypto Include Dir: /tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/include
  -- LibCrypto Shared Lib:  /usr/lib/x86_64-linux-gnu/libcrypto.so
  -- LibCrypto Static Lib:  /tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/lib/libcrypto.a
  -- Configuring done
  CMake Error at CMakeLists.txt:191 (add_library):
    Target "s2n" links to target "LibCrypto::Crypto" but the target was not
    found.  Perhaps a find_package() call is missing for an IMPORTED target, or
    an ALIAS target is missing?


  CMake Error at CMakeLists.txt:239 (target_include_directories):
    Error evaluating generator expression:

      $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

    Target "LibCrypto::Crypto" not found.


  CMake Error at CMakeLists.txt:239 (target_include_directories):
    Error evaluating generator expression:

      $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

    Target "LibCrypto::Crypto" not found.


  CMake Error at CMakeLists.txt:239 (target_include_directories):
    Error evaluating generator expression:

      $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

    Target "LibCrypto::Crypto" not found.


  CMake Error at CMakeLists.txt:239 (target_include_directories):
    Error evaluating generator expression:

      $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

    Target "LibCrypto::Crypto" not found.


  CMake Error at CMakeLists.txt:191 (add_library):
    Target "s2n" links to target "LibCrypto::Crypto" but the target was not
    found.  Perhaps a find_package() call is missing for an IMPORTED target, or
    an ALIAS target is missing?


  -- Generating done
  CMake Warning:
    Manually-specified variables were not used by the project:

      CMAKE_INCLUDE_PATH


  -- Build files have been written to: /tmp/pip-install-74gwxf0s/awscrt/build/deps/s2n
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-74gwxf0s/awscrt/setup.py", line 245, in <module>
      setuptools.setup(
    File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 161, in setup
      return distutils.core.setup(**attrs)
    File "/usr/local/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/local/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 223, in run
      self.run_command('build')
    File "/usr/local/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/local/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-74gwxf0s/awscrt/setup.py", line 179, in run
      self._build_dependency(lib)
    File "/tmp/pip-install-74gwxf0s/awscrt/setup.py", line 162, in _build_dependency
      subprocess.check_call(cmake_args)
    File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-74gwxf0s/awscrt/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-74gwxf0s/awscrt/build/deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_INCLUDE_PATH="/usr/local/include/python3.8"', '-DCMAKE_LIBRARY_PATH="/usr/local/lib"', '-DLibCrypto_INCLUDE_DIR=/tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/include', '-DLibCrypto_STATIC_LIBRARY=/tmp/pip-install-74gwxf0s/awscrt/build/deps/libcrypto/lib/libcrypto.a', '/tmp/pip-install-74gwxf0s/awscrt/crt/s2n']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for awscrt

J'ai le même problème sur Arch Linux, python 3.8, Openssl v1.1.1h.

Même problème ici : docker image python : dernière exécution sur Raspberry Pi 4.
Versions dans le conteneur : Debian GNU/Linux 10 (buster), Python 3.9.0, Openssl 1.1.1d
Malheureusement, les versions 1.5.0 et 1.4.0 ne fonctionnent pas pour moi, cela génère une erreur différente. Voir fichier joint..
En dehors du conteneur (Raspbian) 1.5.0 fonctionne.
error_awsiotsdk.txt
Existe-t-il des erreurs connues avec les conteneurs Docker ?
Edit : j'ai découvert que c'était incompatible avec Python 3.9.0 ! en utilisant 3.8 cela fonctionne.

J'ai aussi ces problèmes. J'utilise un raspberry 3 modèle B avec python 3.7.3.


Erreurs lors de l'exécution de python3 -m pip install awsiotsdk et python3 -m pip install ./aws-iot-device-sdk-python-v2

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/pi/aws-iot-device-sdk-python-v2
Collecting awscrt==0.9.3 (from awsiotsdk==1.0.0.dev0)
  Using cached https://files.pythonhosted.org/packages/83/2b/ad7fe011bb17baeb59f4a6e4b6f8b0e53da607b6cc2b50bf3e3c57624a7e/awscrt-0.9.3.tar.gz
Building wheels for collected packages: awsiotsdk, awscrt
  Running setup.py bdist_wheel for awsiotsdk ... done
  Stored in directory: /home/pi/.cache/pip/wheels/c2/c1/c8/34fc01d6902334ae9a2945b916990246499b722dfd1bfe1970
  Running setup.py bdist_wheel for awscrt ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-wejvufi4/awscrt/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-5cp0qcot --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-3.7
  creating build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/__init__.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/mqtt.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/io.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/exceptions.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/crypto.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/http.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/auth.py -> build/lib.linux-armv7l-3.7/awscrt
  running build_ext
  cmake version 3.18.2

  CMake suite maintained and supported by Kitware (kitware.com/cmake).
  --- Building dependency: s2n (RelWithDebInfo) ---
  cmake -DCMAKE_PREFIX_PATH=/tmp/pip-install-wejvufi4/awscrt/build/deps/install -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-wejvufi4/awscrt/build/deps/install -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCMAKE_INCLUDE_PATH=\"/usr/include/python3.7m\" -DLibCrypto_INCLUDE_DIR=/tmp/pip-install-wejvufi4/awscrt/build/deps/libcrypto/include -DLibCrypto_STATIC_LIBRARY=/tmp/pip-install-wejvufi4/awscrt/build/deps/libcrypto/lib/libcrypto.a /tmp/pip-install-wejvufi4/awscrt/crt/s2n
  -- The C compiler identification is GNU 8.3.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  -- Check if compiler accepts -pthread
  -- Check if compiler accepts -pthread - yes
  -- Found Threads: TRUE
  -- Attempting to try_compile PQ ASM
  -- The ASM compiler identification is GNU
  -- Found assembler: /usr/bin/cc
  -- PQ ASM try_compile failed - using generic C code for PQ crypto
  -- Performing Test S2N_HAVE_EXECINFO
  -- Performing Test S2N_HAVE_EXECINFO - Success
  -- Found LibCrypto: /tmp/pip-install-wejvufi4/awscrt/build/deps/libcrypto/lib/libcrypto.a
  -- LibCrypto Include Dir: /tmp/pip-install-wejvufi4/awscrt/build/deps/libcrypto/include
  -- LibCrypto Shared Lib:  /usr/lib/arm-linux-gnueabihf/libcrypto.so
  -- LibCrypto Static Lib:  /tmp/pip-install-wejvufi4/awscrt/build/deps/libcrypto/lib/libcrypto.a
  -- Configuring done
  CMake Error at CMakeLists.txt:191 (add_library):
    Target "s2n" links to target "LibCrypto::Crypto" but the target was not
    found.  Perhaps a find_package() call is missing for an IMPORTED target, or
    an ALIAS target is missing?


  CMake Error at CMakeLists.txt:239 (target_include_directories):
    Error evaluating generator expression:

      $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

    Target "LibCrypto::Crypto" not found.


  CMake Error at CMakeLists.txt:239 (target_include_directories):
    Error evaluating generator expression:

      $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

    Target "LibCrypto::Crypto" not found.


  CMake Error at CMakeLists.txt:191 (add_library):
    Target "s2n" links to target "LibCrypto::Crypto" but the target was not
    found.  Perhaps a find_package() call is missing for an IMPORTED target, or
    an ALIAS target is missing?


  -- Generating done
  CMake Warning:
    Manually-specified variables were not used by the project:

      CMAKE_INCLUDE_PATH


  CMake Generate step failed.  Build files cannot be regenerated correctly.
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-wejvufi4/awscrt/setup.py", line 263, in <module>
      'boto3'
    File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 188, in run
      self.run_command('build')
    File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-wejvufi4/awscrt/setup.py", line 179, in run
      self._build_dependency(lib)
    File "/tmp/pip-install-wejvufi4/awscrt/setup.py", line 162, in _build_dependency
      subprocess.check_call(cmake_args)
    File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-wejvufi4/awscrt/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-wejvufi4/awscrt/build/deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_INCLUDE_PATH="/usr/include/python3.7m"', '-DLibCrypto_INCLUDE_DIR=/tmp/pip-install-wejvufi4/awscrt/build/deps/libcrypto/include', '-DLibCrypto_STATIC_LIBRARY=/tmp/pip-install-wejvufi4/awscrt/build/deps/libcrypto/lib/libcrypto.a', '/tmp/pip-install-wejvufi4/awscrt/crt/s2n']' returned non-zero exit status 1.

  ----------------------------------------
  Failed building wheel for awscrt
  Running setup.py clean for awscrt
Successfully built awsiotsdk
Failed to build awscrt
Installing collected packages: awscrt, awsiotsdk
  Running setup.py install for awscrt ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-wejvufi4/awscrt/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-cg6etnjd/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    running build_py
    creating build/lib.linux-armv7l-3.7
    creating build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/__init__.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/mqtt.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/io.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/exceptions.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/crypto.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/http.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/auth.py -> build/lib.linux-armv7l-3.7/awscrt
    running build_ext
    cmake version 3.18.2

    CMake suite maintained and supported by Kitware (kitware.com/cmake).
    --- Building dependency: s2n (RelWithDebInfo) ---
    cmake -DCMAKE_PREFIX_PATH=/tmp/pip-install-wejvufi4/awscrt/build/deps/install -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-wejvufi4/awscrt/build/deps/install -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCMAKE_INCLUDE_PATH=\"/usr/include/python3.7m\" -DLibCrypto_INCLUDE_DIR=/tmp/pip-install-wejvufi4/awscrt/build/deps/libcrypto/include -DLibCrypto_STATIC_LIBRARY=/tmp/pip-install-wejvufi4/awscrt/build/deps/libcrypto/lib/libcrypto.a /tmp/pip-install-wejvufi4/awscrt/crt/s2n
    -- Attempting to try_compile PQ ASM
    -- PQ ASM try_compile failed - using generic C code for PQ crypto
    -- LibCrypto Include Dir: /tmp/pip-install-wejvufi4/awscrt/build/deps/libcrypto/include
    -- LibCrypto Shared Lib:  /usr/lib/arm-linux-gnueabihf/libcrypto.so
    -- LibCrypto Static Lib:  /tmp/pip-install-wejvufi4/awscrt/build/deps/libcrypto/lib/libcrypto.a
    -- Configuring done
    CMake Error at CMakeLists.txt:191 (add_library):
      Target "s2n" links to target "LibCrypto::Crypto" but the target was not
      found.  Perhaps a find_package() call is missing for an IMPORTED target, or
      an ALIAS target is missing?


    CMake Error at CMakeLists.txt:239 (target_include_directories):
      Error evaluating generator expression:

        $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

      Target "LibCrypto::Crypto" not found.


    CMake Error at CMakeLists.txt:239 (target_include_directories):
      Error evaluating generator expression:

        $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

      Target "LibCrypto::Crypto" not found.


    CMake Error at CMakeLists.txt:191 (add_library):
      Target "s2n" links to target "LibCrypto::Crypto" but the target was not
      found.  Perhaps a find_package() call is missing for an IMPORTED target, or
      an ALIAS target is missing?


    -- Generating done
    CMake Generate step failed.  Build files cannot be regenerated correctly.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-wejvufi4/awscrt/setup.py", line 263, in <module>
        'boto3'
      File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.7/distutils/command/install.py", line 589, in run
        self.run_command('build')
      File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-wejvufi4/awscrt/setup.py", line 179, in run
        self._build_dependency(lib)
      File "/tmp/pip-install-wejvufi4/awscrt/setup.py", line 162, in _build_dependency
        subprocess.check_call(cmake_args)
      File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-wejvufi4/awscrt/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-wejvufi4/awscrt/build/deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_INCLUDE_PATH="/usr/include/python3.7m"', '-DLibCrypto_INCLUDE_DIR=/tmp/pip-install-wejvufi4/awscrt/build/deps/libcrypto/include', '-DLibCrypto_STATIC_LIBRARY=/tmp/pip-install-wejvufi4/awscrt/build/deps/libcrypto/lib/libcrypto.a', '/tmp/pip-install-wejvufi4/awscrt/crt/s2n']' returned non-zero exit status 1.

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-wejvufi4/awscrt/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-cg6etnjd/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-wejvufi4/awscrt/

J'ai également ce problème et mon projet de construction de codebuild échoue maintenant (py 3.8), j'ai déjà posté le problème sur le référentiel awscrt https://github.com/awslabs/aws-crt-python/issues/192

Même problème avec raspberry 3 modèle B avec python. Reviendra à la v1.5

@alozano-77 ouais je suis également revenu à 1.5.0 pour l'instant, je reviendrai quand il sera corrigé

Nous avons récemment remanié le finder cmake libcrypto et je soupçonne que c'est lié à cela, nous contacterons l'équipe pour y jeter un œil. Désolé pour vos ennuis.

Ceci est corrigé dans 1.5.2

️AVERTISSEMENT DE VISIBILITÉ DES COMMENTAIRES⚠️

Les commentaires sur les problèmes fermés sont difficiles à voir pour notre équipe.
Si vous avez besoin de plus d'aide, veuillez soit taguer un membre de l'équipe, soit ouvrir un nouveau problème faisant référence à celui-ci.
Si vous souhaitez continuer à avoir une conversation avec d'autres membres de la communauté sur ce problème, n'hésitez pas à le faire.

Cette page vous a été utile?
0 / 5 - 0 notes

Questions connexes

mkozjak picture mkozjak  ·  17Commentaires

supertick picture supertick  ·  7Commentaires

banuprathap picture banuprathap  ·  10Commentaires

victorct-pronto picture victorct-pronto  ·  3Commentaires

mkozjak picture mkozjak  ·  8Commentaires