Aws-iot-device-sdk-python-v2: Probleme mit der Installation

Erstellt am 13. Okt. 2020  ·  16Kommentare  ·  Quelle: aws/aws-iot-device-sdk-python-v2

Nachdem ich mir die meisten der geschlossenen Probleme auf dieser Seite angesehen habe, gibt es mehrere Diskussionen über dieses Problem, aber keines löst es für mich.

Wenn Sie versuchen, entweder mit zu installieren
python3 -m pip install awsiotsdk oder
git-Klon https://github.com/aws/aws-iot-device-sdk-python-v2.git
python3 -m pip install ./aws-iot-device-sdk-python-v2

ich bekomme folgendes:


Sammeln von awsiotsdk
Verwenden von zwischengespeichertem awsiotsdk-1.5.1-py3-none-any.whl (18 kB)
Sammeln von awscrt==0.9.3
Verwenden von zwischengespeichertem awscrt-0.9.3.tar.gz (2,5 MB)
Räder für gesammelte Pakete bauen: awscrt
Baurad für awscrt (setup.py) ... Fehler
FEHLER: Befehl fehlgeschlagen mit Exit-Status 1:
Befehl: /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/
Gesamtausgabe (112 Zeilen):
Laufen bdist_wheel
laufender Build
Ausführen von build_py
Build erstellen
Erstellen von build/lib.linux-aarch64-3.6
build/lib.linux-aarch64-3.6/awscrt erstellen
awscrt/auth.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/crypto.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/http.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/io.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/mqtt.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/__init__.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/exceptions.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/awsiot_mqtt_connection_builder.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
Ausführen von build_ext
cmake-Version 3.10.2

Die CMake-Suite wird von Kitware (kitware.com/cmake) gewartet und unterstützt.
--- Gebäudeabhängigkeit: 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= OFF -DCMAKE_INCLUDE_PATH=\"/usr/include/python3.6m\" -DLibCrypto_INCLUDE_DIR=/tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/include -DLibCrypto_STATIC_LIBRARY-ge/paw/sc /build/deps/libcrypto/lib/libcrypto.a /tmp/pip-install-un4mvgep/awscrt/crt/s2n
-- Die C-Compiler-Identifikation ist GNU 7.5.0
-- Überprüfen Sie, ob der C-Compiler funktioniert: /usr/bin/cc
-- Überprüfen Sie, ob der C-Compiler funktioniert: /usr/bin/cc -- funktioniert
-- Erkennung von C-Compiler-ABI-Infos
-- C-Compiler-ABI-Informationen erkennen - fertig
-- Erkennung von C-Kompilierungsfunktionen
-- C-Kompilierungsfunktionen erkennen - fertig
-- Auf der Suche nach pthread.h
-- Suche nach pthread.h - gefunden
-- Suche nach pthread_create
-- Suche nach pthread_create - nicht gefunden
-- Überprüfen Sie, ob der Compiler -pthread . akzeptiert
-- Überprüfen Sie, ob der Compiler -pthread - yes . akzeptiert
-- Gefundene Themen: WAHR
-- Versuch von try_compile PQ ASM
-- Die ASM-Compiler-Identifikation ist GNU
-- Assembler gefunden: /usr/bin/cc
-- PQ ASM try_compile fehlgeschlagen - Verwendung von generischem C-Code für PQ-Krypto
-- Durchführen des Tests S2N_HAVE_EXECINFO
-- Durchführen von Test S2N_HAVE_EXECINFO - Erfolg
-- LibCrypto gefunden: /tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/lib/libcrypto.a
-- LibCrypto-Include-Verzeichnis: /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
-- Konfiguration fertig
CMake-Fehler bei CMakeLists. txt:191 (add_library):
Ziel "s2n" verlinkt zum Ziel "LibCrypto::Crypto", aber das Ziel war nicht
gefunden. Vielleicht fehlt ein find_package()-Aufruf für ein IMPORTED-Ziel, oder
ein ALIAS-Target fehlt?

CMake-Fehler bei CMakeLists. txt:239 (target_include_directories):
Fehler beim Auswerten des Generatorausdrucks:

  $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

Target "LibCrypto::Crypto" not found.

CMake-Fehler bei CMakeLists. txt:239 (target_include_directories):
Fehler beim Auswerten des Generatorausdrucks:

  $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

Target "LibCrypto::Crypto" not found.

CMake-Fehler bei CMakeLists. txt:191 (add_library):
Ziel "s2n" verlinkt zum Ziel "LibCrypto::Crypto", aber das Ziel war nicht
gefunden. Vielleicht fehlt ein find_package()-Aufruf für ein IMPORTED-Ziel, oder
ein ALIAS-Target fehlt?

-- Generieren fertig
CMake-Warnung:
Manuell angegebene Variablen wurden vom Projekt nicht verwendet:

  CMAKE_INCLUDE_PATH

-- Build-Dateien wurden geschrieben nach: /tmp/pip-install-un4mvgep/awscrt/build/deps/s2n
Traceback (letzter Anruf zuletzt):
Datei "", Zeile 1, in
Datei "/tmp/pip-install-un4mvgep/awscrt/setup.py", Zeile 263, in
'boto3'
Datei "/usr/lib/python3/dist-packages/setuptools/__init__.py", Zeile 129, im Setup
Rückgabe distutils.core.setup(**attrs)
Datei "/usr/lib/python3.6/distutils/core.py", Zeile 148, im Setup
dist.run_commands()
Datei "/usr/lib/python3.6/distutils/dist.py", Zeile 955, in run_commands
self.run_command(cmd)
Datei "/usr/lib/python3.6/distutils/dist.py", Zeile 974, in run_command
cmd_obj.run()
Datei "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", Zeile 204, in Run
self.run_command('build')
Datei "/usr/lib/python3.6/distutils/cmd.py", Zeile 313, in run_command
self.distribution.run_command(Befehl)
Datei "/usr/lib/python3.6/distutils/dist.py", Zeile 974, in run_command
cmd_obj.run()
Datei "/usr/lib/python3.6/distutils/command/build.py", Zeile 135, in Run
self.run_command(cmd_name)
Datei "/usr/lib/python3.6/distutils/cmd.py", Zeile 313, in run_command
self.distribution.run_command(Befehl)
Datei "/usr/lib/python3.6/distutils/dist.py", Zeile 974, in run_command
cmd_obj.run()
Datei "/tmp/pip-install-un4mvgep/awscrt/setup.py", Zeile 179, in Ausführung
self._build_dependency(lib)
Datei "/tmp/pip-install-un4mvgep/awscrt/setup.py", Zeile 162, in _build_dependency
subprocess.check_call(cmake_args)
Datei "/usr/lib/python3.6/subprocess.py", Zeile 311, in check_call
Raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Befehl '['cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-un4mvgep/awscrt/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-un4rvgep//awscrt deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_INCLUDE_PATH="/usr/include/python3.6m"', '-DLibCrypto_IR/DLibCrypto_IN -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']' hat den Exit-Status 1 ungleich Null zurückgegeben.


FEHLER: Fehler beim Baurad für awscrt
Ausführen von setup.py clean für awscrt
Fehler beim Erstellen von awscrt
Gesammelte Pakete installieren: awscrt, awsiotsdk
Ausführen von setup.py install für awscrt ... Fehler
FEHLER: Befehl fehlgeschlagen mit Exit-Status 1:
Befehl: /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/
Gesamtausgabe (88 Zeilen):
laufende Installation
laufender Build
Ausführen von build_py
Erstellen von build/lib.linux-aarch64-3.6
build/lib.linux-aarch64-3.6/awscrt erstellen
awscrt/auth.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/crypto.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/http.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/io.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/mqtt.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/__init__.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/exceptions.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
awscrt/awsiot_mqtt_connection_builder.py kopieren -> build/lib.linux-aarch64-3.6/awscrt
Ausführen von 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.
----------------------------------------

FEHLER: Befehl fehlgeschlagen mit Exit-Status 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 Überprüfen Sie die Protokolle auf die vollständige Befehlsausgabe.


Ich habe versucht, mit oder ohne sudo -H auszuführen.
Danke für die Hilfe.

bug

Alle 16 Kommentare

Welches Betriebssystem verwendest du? Welche Openssl-Version hast du installiert? Um eine offene SSL-Version zu erhalten, verwenden Sie openssl version -a

Hast du auch folgendes probiert:

Installationsprobleme

awsiotsdk hängt von awscrt ab, das C-Erweiterungen verwendet. Vorkompilierte Räder werden bei der Installation auf den wichtigsten Plattformen (Mac, Windows, Linux, Raspbian) heruntergeladen. Wenn Räder für Ihre Plattform nicht verfügbar sind, muss Ihr Computer einige C-Bibliotheken kompilieren. Wenn Probleme auftreten, installieren Sie Folgendes und versuchen Sie es erneut:

sudo apt-get update
sudo apt-get install cmake
sudo apt-get install libssl-dev

Ich habe genau das gleiche Problem in Ubuntu 20.04 / aarch64 / Python 3.8 / OpenSSL 1.1.1f .

Ich habe dies bereits versucht, und mein Gerät ist ein Jetson Nano. Ich habe OpenSSL 1.1.1 installiert, und ich habe versucht, mit sudo -H python3 -m pip install awsiotsdk==1.5.0 zu installieren und es hat funktioniert, also vermute ich, dass es ein Problem mit der neuesten Version ist

Hast du auch folgendes probiert:

Installationsprobleme
awsiotsdk hängt von awscrt ab, das C-Erweiterungen verwendet. Vorkompilierte Räder werden bei der Installation auf den wichtigsten Plattformen (Mac, Windows, Linux, Raspbian) heruntergeladen. Wenn Räder für Ihre Plattform nicht verfügbar sind, muss Ihr Computer einige C-Bibliotheken kompilieren. Wenn Probleme auftreten, installieren Sie Folgendes und versuchen Sie es erneut:
sudo apt-get update
sudo apt-get install cmake
sudo apt-get install libssl-dev

Beim Ausführen der gleichen Schritte wie bei @Sanrro10 habe ich jedoch mit einem Raspberry Pi das gleiche Problem. Rollback auf v1.5.0 hat funktioniert. Definitiv ein Problem mit v1.5.1.

Wir arbeiten derzeit an einem Fix, der jedoch nur ARM-Plattformen betreffen sollte. Wie @Sanrro10 herausgefunden hat, können Sie

Ich sehe das gleiche Problem bei der Installation einer App mit awsiotsdk als Abhängigkeit in einem trivialen Docker-Container.

  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

Ich habe das gleiche Problem unter Arch Linux, Python 3.8, Openssl v.1.1.1h.

Gleiches Problem hier: Docker-Image python:latest läuft auf Raspberry Pi 4.
Versionen im Container: Debian GNU/Linux 10 (Buster), Python 3.9.0, Openssl 1.1.1d
Leider funktionieren auch die Versionen 1.5.0 und 1.4.0 bei mir nicht, es wirft einen anderen Fehler. Siehe Datei im Anhang..
Außerhalb des Containers (Raspbian) funktioniert 1.5.0.
error_awsiotsdk.txt
Gibt es bekannte Fehler bei Docker-Containern?
Bearbeiten : Ich habe herausgefunden, dass es mit Python 3.9.0 nicht kompatibel ist! Mit 3.8 funktioniert es.

Ich habe auch diese Probleme. Ich verwende ein Raspberry 3 Modell B mit Python 3.7.3.


Fehler beim Ausführen von python3 -m pip install awsiotsdk und 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/

Ich habe auch dieses Problem und mein Codebuild-Build-Projekt schlägt jetzt fehl (py 3.8). Ich habe das Problem bereits im awscrt-Repository https://github.com/awslabs/aws-crt-python/issues/192 gepostet

Gleiches Problem mit Raspberry 3 Modell B mit Python. Rollback auf v1.5

@alozano-77 ja, ich habe vorerst auch auf 1.5.0 zurückgesetzt, werde es erneut besuchen, wenn es behoben ist

Wir haben den cmake libcrypto Finder vor kurzem überarbeitet und ich vermute, dass es damit zusammenhängt. Wir werden uns an das Team wenden, um einen Blick darauf zu werfen. Entschuldigung für Ihre Probleme.

Dies ist in 1.5.2 behoben

⚠️KOMMENTAR-SICHTBARKEIT-WARNUNG⚠️

Kommentare zu geschlossenen Issues sind für unser Team schwer zu sehen.
Wenn Sie weitere Hilfe benötigen, markieren Sie entweder ein Teammitglied oder öffnen Sie ein neues Problem, das auf dieses verweist.
Wenn Sie sich weiterhin mit anderen Community-Mitgliedern zu diesem Thema unterhalten möchten, können Sie dies gerne tun.

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen