Aws-iot-device-sdk-python-v2: Masalah dengan instalasi

Dibuat pada 13 Okt 2020  ·  16Komentar  ·  Sumber: aws/aws-iot-device-sdk-python-v2

Setelah melihat sebagian besar masalah tertutup di halaman ini, ada beberapa diskusi tentang masalah ini, tetapi tidak ada yang menyelesaikannya untuk saya.

Ketika mencoba untuk menginstal baik dengan
python3 -m pip install awsiotsdk atau
git clone https://github.com/aws/aws-iot-device-sdk-python-v2.git
python3 -m pip instal ./aws-iot-device-sdk-python-v2

saya mendapatkan yang berikut:


Mengumpulkan awsiotsdk
Menggunakan cache awsiotsdk-1.5.1-py3-none-any.whl (18 kB)
Mengumpulkan awscrt==0.9.3
Menggunakan cache awscrt-0.9.3.tar.gz (2,5 MB)
Membangun roda untuk paket yang dikumpulkan: awscrt
Membangun roda untuk awscrt (setup.py) ... error
GALAT: Perintah salah dengan status keluar 1:
perintah: /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'"'"', buka)(__file__) ;code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile( kode, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-s5x44slu
cwd: /tmp/pip-install-un4mvgep/awscrt/
Keluaran lengkap (112 baris):
menjalankan bdist_wheel
menjalankan build
menjalankan build_py
membuat bangunan
membuat build/lib.linux-aarch64-3.6
membuat build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/auth.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/crypto.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/http.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/io.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/mqtt.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/__init__.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/exceptions.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-aarch64-3.6/awscrt
menjalankan build_ext
cmake versi 3.10.2

CMake suite dipelihara dan didukung oleh Kitware (kitware.com/cmake).
--- Membangun ketergantungan: 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=FORelD_LIBS=OFF -D OFF -DCMAKE_INCLUDE_PATH=\"/usr/include/python3.6m\" -DLibCrypto_INCLUDE_DIR=/tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/include -DLibCrypto_STATIC_LIBRARY=/tmp4/pip-install /build/deps/libcrypto/lib/libcrypto.a /tmp/pip-install-un4mvgep/awscrt/crt/s2n
-- Identifikasi kompiler C adalah GNU 7.5.0
-- Periksa compiler C yang berfungsi: /usr/bin/cc
-- Periksa kompiler C yang berfungsi: /usr/bin/cc -- berfungsi
-- Mendeteksi informasi ABI kompiler C
-- Mendeteksi info ABI kompiler C - selesai
-- Mendeteksi fitur kompilasi C
-- Mendeteksi fitur kompilasi C - selesai
-- Mencari pthread.h
-- Mencari pthread.h - ditemukan
-- Mencari pthread_create
-- Mencari pthread_create - tidak ditemukan
-- Periksa apakah kompiler menerima -pthread
-- Periksa apakah compiler menerima -pthread - yes
-- Ditemukan Utas: BENAR
-- Mencoba untuk try_compile PQ ASM
-- Identifikasi compiler ASM adalah GNU
-- Perakit yang ditemukan: /usr/bin/cc
-- PQ ASM try_compile gagal - menggunakan kode C generik untuk PQ crypto
-- Melakukan Tes S2N_HAVE_EXECINFO
-- Melakukan Tes S2N_HAVE_EXECINFO - Sukses
-- Ditemukan LibCrypto: /tmp/pip-install-un4mvgep/awscrt/build/deps/libcrypto/lib/libcrypto.a
-- LibCrypto Sertakan 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
-- Konfigurasi selesai
Kesalahan CMake di CMakeLists. txt: 191 (tambahkan_perpustakaan):
Targetkan tautan "s2n" ke target "LibCrypto::Crypto" tetapi targetnya bukan
ditemukan. Mungkin panggilan find_package() tidak ada untuk target IMPORTED, atau
target ALIAS tidak ada?

Kesalahan CMake di CMakeLists. txt:239 (target_include_directories):
Kesalahan saat mengevaluasi ekspresi generator:

  $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

Target "LibCrypto::Crypto" not found.

Kesalahan CMake di CMakeLists. txt:239 (target_include_directories):
Kesalahan saat mengevaluasi ekspresi generator:

  $<TARGET_PROPERTY:LibCrypto::Crypto,INTERFACE_INCLUDE_DIRECTORIES>

Target "LibCrypto::Crypto" not found.

Kesalahan CMake di CMakeLists. txt: 191 (tambahkan_perpustakaan):
Targetkan tautan "s2n" ke target "LibCrypto::Crypto" tetapi targetnya bukan
ditemukan. Mungkin panggilan find_package() tidak ada untuk target IMPORTED, atau
target ALIAS tidak ada?

-- Pembuatan selesai
CMembuat Peringatan:
Variabel yang ditentukan secara manual tidak digunakan oleh proyek:

  CMAKE_INCLUDE_PATH

-- Membangun file telah ditulis ke: /tmp/pip-install-un4mvgep/awscrt/build/deps/s2n
Traceback (panggilan terakhir terakhir):
berkas "", baris 1, di
File "/tmp/pip-install-un4mvgep/awscrt/setup.py", baris 263, di
'boto3'
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", baris 129, dalam pengaturan
kembalikan distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", baris 148, dalam pengaturan
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", baris 955, di run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", baris 974, di run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", baris 204, sedang dijalankan
self.run_command('membangun')
File "/usr/lib/python3.6/distutils/cmd.py", baris 313, di run_command
self.distribusi.run_command(perintah)
File "/usr/lib/python3.6/distutils/dist.py", baris 974, di run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", baris 135, sedang dijalankan
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", baris 313, di run_command
self.distribusi.run_command(perintah)
File "/usr/lib/python3.6/distutils/dist.py", baris 974, di run_command
cmd_obj.run()
File "/tmp/pip-install-un4mvgep/awscrt/setup.py", baris 179, sedang dijalankan
self._build_dependency(lib)
File "/tmp/pip-install-un4mvgep/awscrt/setup.py", baris 162, di _build_dependency
subprocess.check_call(cmake_args)
File "/usr/lib/python3.6/subprocess.py", baris 311, di check_call
naikkan CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Perintah '['cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-un4mvgep/awscrt/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-un4mvgep/awscrt deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_INCLUDE_PATH="/usr/include/python3.6m"', '-DLibDE_pip'-DLibDE -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']' mengembalikan status keluar bukan nol 1.


KESALAHAN: Gagal membuat roda untuk awscrt
Menjalankan setup.py clean untuk awscrt
Gagal membuat awscrt
Menginstal paket yang dikumpulkan: awscrt, awsiotsdk
Menjalankan setup.py install untuk awscrt ... error
GALAT: Perintah salah dengan status keluar 1:
perintah: /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'"'"', buka)(__file__) ;code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile( kode, __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/
Keluaran lengkap (88 baris):
menjalankan instal
menjalankan build
menjalankan build_py
membuat build/lib.linux-aarch64-3.6
membuat build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/auth.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/crypto.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/http.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/io.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/mqtt.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/__init__.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/exceptions.py -> build/lib.linux-aarch64-3.6/awscrt
menyalin awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-aarch64-3.6/awscrt
menjalankan build_ext
cmake versi 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.
----------------------------------------

GALAT: Perintah salah dengan status keluar 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'"'"', buka)(__file__) ;code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile( kode, __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 Periksa log untuk keluaran perintah lengkap.


Saya sudah mencoba mengeksekusi dengan atau tanpa Sudo -H.
Terima kasih untuk bantuannya.

bug

Semua 16 komentar

Apa OS yang Anda gunakan? Versi openssl apa yang telah Anda instal? Untuk mendapatkan versi ssl terbuka gunakan openssl version -a

Anda juga sudah mencoba yang berikut ini:

Masalah Instalasi

awsiotsdk bergantung pada awscrt, yang menggunakan ekstensi C. Roda yang telah dikompilasi diunduh saat menginstal pada platform utama (Mac, Windows, Linux, Raspbian. Jika roda tidak tersedia untuk platform Anda, mesin Anda harus mengompilasi beberapa pustaka C. Jika Anda mengalami masalah, instal yang berikut dan coba lagi:

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

Saya memiliki masalah yang sama persis di Ubuntu 20.04 / aarch64 / Python 3.8 / OpenSSL 1.1.1f .

Saya sudah mencoba ini, dan perangkat saya adalah nano Jetson. Saya telah menginstal OpenSSL 1.1.1, dan saya telah mencoba menginstal dengan Sudo -H python3 -m pip install awsiotsdk==1.5.0 dan berhasil, jadi saya kira ini masalah dengan rilis terbaru

Anda juga sudah mencoba yang berikut ini:

Masalah Instalasi
awsiotsdk bergantung pada awscrt, yang menggunakan ekstensi C. Roda yang telah dikompilasi diunduh saat menginstal pada platform utama (Mac, Windows, Linux, Raspbian. Jika roda tidak tersedia untuk platform Anda, mesin Anda harus mengompilasi beberapa pustaka C. Jika Anda mengalami masalah, instal yang berikut dan coba lagi:
sudo apt-get update
sudo apt-get install cmake
sudo apt-get install libssl-dev

Menjalankan melalui langkah-langkah yang sama seperti @ Sanrro10 tetapi dengan Raspberry Pi saya mengalami masalah yang sama. Mengembalikan ke v1.5.0 berhasil. Pasti ada masalah dengan v1.5.1.

Kami sedang mengerjakan perbaikan, tetapi ini seharusnya hanya memengaruhi platform ARM. Untuk saat ini, seperti yang diketahui oleh @Sanrro10 , Anda dapat menggunakan versi 1.5.0 sebelumnya. Saya akan memperbarui masalah ini setelah perbaikan diterbitkan.

Saya melihat masalah yang sama saat menginstal aplikasi dengan awsiotsdk sebagai ketergantungan dalam wadah buruh pelabuhan yang sepele.

  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

Saya memiliki masalah yang sama di Arch Linux, python 3.8, Openssl v.1.1.1h.

Masalah yang sama di sini: docker image python: terbaru berjalan di Raspberry Pi 4.
Versi dalam Kontainer: Debian GNU/Linux 10 (buster), Python 3.9.0, Openssl 1.1.1d
Sayangnya juga versi 1.5.0 dan 1.4.0 tidak berfungsi untuk saya, itu menimbulkan kesalahan yang berbeda. Lihat file terlampir..
Di luar wadah (Raspbian) 1.5.0 berfungsi.
error_awsiotsdk.txt
Apakah ada kesalahan yang diketahui dengan wadah buruh pelabuhan?
Sunting : saya menemukan bahwa itu tidak kompatibel dengan Python 3.9.0! menggunakan 3.8 berhasil.

Saya juga mengalami masalah ini. Saya menggunakan raspberry 3 model B dengan python 3.7.3.


Kesalahan saat menjalankan python3 -m pip install awsiotsdk dan 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/

Saya juga mengalami masalah ini dan proyek build codebuild saya sekarang gagal (py 3.8), saya sudah memposting masalah di repo awscrt https://github.com/awslabs/aws-crt-python/issues/192

Masalah yang sama dengan raspberry 3 model B dengan python. Akan kembali ke v1.5

@alozano-77 ya saya memutar kembali juga ke 1.5.0 untuk saat ini, akan mengunjungi kembali ketika sudah diperbaiki

Kami memfaktorkan ulang cmake libcrypto finder baru-baru ini dan saya menduga ini terkait dengan itu, akan menghubungi tim untuk melihatnya. Maaf untuk masalah Anda.

Ini diperbaiki di 1.5.2

️PERINGATAN VISIBILITAS KOMENTAR⚠️

Komentar tentang masalah tertutup sulit dilihat oleh tim kami.
Jika Anda memerlukan bantuan lebih lanjut, beri tag anggota tim atau buka edisi baru yang merujuk pada masalah ini.
Jika Anda ingin terus mengobrol dengan anggota komunitas lain di bawah masalah ini, silakan lakukan.

Apakah halaman ini membantu?
0 / 5 - 0 peringkat