aws / aws-iot-device-sdk-python-v2

Next generation AWS IoT Client SDK for Python using the AWS Common Runtime
Apache License 2.0
408 stars 213 forks source link

pip install issues #150

Closed elockman closed 3 years ago

elockman commented 3 years ago

I am having issues installing awsiotsdk in embedded Linux on an ARM processor using

pip3 install awsiotsdk

as well as

python3 -m pip install awsiotsdk

My pip version is

pip 21.0.1 from /usr/lib/python3.8/site-packages/pip (python 3.8)

This was claimed to be resolved with v1.5.2 in issue #119, but I have the same errors found in issue #119 from v1.5.0 all the way up to the recently released v1.5.4

The error actually arises in the awscrt download. Is there a dependency missing in requirements.txt?

Collecting awsiotsdk Using cached awsiotsdk-1.5.4-py3-none-any.whl (37 kB) Collecting awscrt==0.9.15 Using cached awscrt-0.9.15.tar.gz (2.6 MB) setup.py install' for awscrt, since package 'wheel' is not installed. Installing collected packages: awscrt, awsiotsdk Running setup.py install for awscrt ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/var/volatile/tmp/pip-install-wazzbvxh/awscrt_dc753234d3204541916d91007191737a/setup.py'"'"'; file='"'"'/var/volatile/tmp/pip-install-wazzbvxh/awscrt_dc753234d3204541916d91007191737a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /var/volatile/tmp/pip-record-9_kt4djs/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/awscrt cwd: /var/volatile/tmp/pip-install-wazzbvxh/awscrt_dc753234d3204541916d91007191737a/ Complete output (51 lines): running install running build running build_py creating build creating build/lib.linux-armv7l-3.8 creating build/lib.linux-armv7l-3.8/awscrt copying awscrt/mqtt.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/io.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/http.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/exceptions.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/crypto.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/auth.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/init.py -> build/lib.linux-armv7l-3.8/awscrt creating build/lib.linux-armv7l-3.8/awscrt/eventstream copying awscrt/eventstream/rpc.py -> build/lib.linux-armv7l-3.8/awscrt/eventstream copying awscrt/eventstream/init.py -> build/lib.linux-armv7l-3.8/awscrt/eventstream running build_ext Traceback (most recent call last): File "", line 1, in File "/var/volatile/tmp/pip-install-wazzbvxh/awscrt_dc753234d3204541916d91007191737a/setup.py", line 300, in setuptools.setup( File "/usr/lib/python3.8/site-packages/setuptools/init.py", line 144, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/usr/lib/python3.8/distutils/command/install.py", line 547, in run self.run_command('build') File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/var/volatile/tmp/pip-install-wazzbvxh/awscrt_dc753234d3204541916d91007191737a/setup.py", line 234, in run self._build_dependency(lib, libcrypto_paths) File "/var/volatile/tmp/pip-install-wazzbvxh/awscrt_dc753234d3204541916d91007191737a/setup.py", line 170, in _build_dependency cmake = get_cmake_path() File "/var/volatile/tmp/pip-install-wazzbvxh/awscrt_dc753234d3204541916d91007191737a/setup.py", line 90, in get_cmake_path raise Exception("CMake must be installed to build from source.") Exception: CMake must be installed to build from source.

ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/var/volatile/tmp/pip-install-wazzbvxh/awscrt_dc753234d3204541916d91007191737a/setup.py'"'"'; file='"'"'/var/volatile/tmp/pip-install-wazzbvxh/awscrt_dc753234d3204541916d91007191737a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /var/volatile/tmp/pip-record-9_kt4djs/i

jmklix commented 3 years ago

What device are you encountering this on?

elockman commented 3 years ago

This is on a yocto Linux build, using a Microchip (Atmel) AT91SAMA5D27 processor.

jmklix commented 3 years ago

Can you try running this: pip3 install wheel

I think this might fix the following problem:

setup.py install' for awscrt, since package 'wheel' is not installed.

elockman commented 3 years ago

Thank you for the suggestion. I installed wheel. It appears to me that the wheel install failed similarly, creating a wheel for setup.py.

root@sama5d2-xplained:~# pip3 install wheel Collecting wheel Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB) Installing collected packages: wheel Successfully installed wheel-0.36.2 root@sama5d2-xplained:~# pip3 install awsiotsdk Collecting awsiotsdk Using cached awsiotsdk-1.5.4-py3-none-any.whl (37 kB) Collecting awscrt==0.9.15 Using cached awscrt-0.9.15.tar.gz (2.6 MB) Building wheels for collected packages: awscrt Building wheel for awscrt (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/setup.py'"'"'; file='"'"'/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/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 /var/volatile/tmp/pip-wheel-ynx69sxw cwd: /var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/ Complete output (49 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-armv7l-3.8 creating build/lib.linux-armv7l-3.8/awscrt copying awscrt/mqtt.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/io.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/http.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/exceptions.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/crypto.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/auth.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/init.py -> build/lib.linux-armv7l-3.8/awscrt creating build/lib.linux-armv7l-3.8/awscrt/eventstream copying awscrt/eventstream/rpc.py -> build/lib.linux-armv7l-3.8/awscrt/eventstream copying awscrt/eventstream/init.py -> build/lib.linux-armv7l-3.8/awscrt/eventstream running build_ext Traceback (most recent call last): File "", line 1, in File "/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/setup.py", line 300, in setuptools.setup( File "/usr/lib/python3.8/site-packages/setuptools/init.py", line 144, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run self.run_command('build') File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/setup.py", line 234, in run self._build_dependency(lib, libcrypto_paths) File "/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/setup.py", line 170, in _build_dependency cmake = get_cmake_path() File "/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/setup.py", line 90, in get_cmake_path raise Exception("CMake must be installed to build from source.") Exception: CMake must be installed to build from source.

ERROR: Failed building wheel for awscrt Running setup.py clean for awscrt Failed to build awscrt Installing collected packages: awscrt, awsiotsdk Running setup.py install for awscrt ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/setup.py'"'"'; file='"'"'/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /var/volatile/tmp/pip-record-fb27oh9x/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/awscrt cwd: /var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/ Complete output (51 lines): running install running build running build_py creating build creating build/lib.linux-armv7l-3.8 creating build/lib.linux-armv7l-3.8/awscrt copying awscrt/mqtt.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/io.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/http.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/exceptions.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/crypto.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/auth.py -> build/lib.linux-armv7l-3.8/awscrt copying awscrt/init.py -> build/lib.linux-armv7l-3.8/awscrt creating build/lib.linux-armv7l-3.8/awscrt/eventstream copying awscrt/eventstream/rpc.py -> build/lib.linux-armv7l-3.8/awscrt/eventstream copying awscrt/eventstream/init.py -> build/lib.linux-armv7l-3.8/awscrt/eventstream running build_ext Traceback (most recent call last): File "", line 1, in File "/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/setup.py", line 300, in setuptools.setup( File "/usr/lib/python3.8/site-packages/setuptools/init.py", line 144, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/usr/lib/python3.8/distutils/command/install.py", line 547, in run self.run_command('build') File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/setup.py", line 234, in run self._build_dependency(lib, libcrypto_paths) File "/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/setup.py", line 170, in _build_dependency cmake = get_cmake_path() File "/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/setup.py", line 90, in get_cmake_path raise Exception("CMake must be installed to build from source.") Exception: CMake must be installed to build from source.

ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/setup.py'"'"'; file='"'"'/var/volatile/tmp/pip-install-x2ssvd0u/awscrt_218aaefda4464d9f9410cc105f4ccba3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /var/volatile/tmp/pip-record-fb27oh9x/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/awscrt Check the logs for full command output. root@sama5d2-xplained:~#

JonathanHenson commented 3 years ago

According to your posted output you didn’t pull the wheel, but instead it used the cached version (that’s unbuilt) from a previous attempt. Maybe try forcing pip to flush the cache and try again?

elockman commented 3 years ago

First, I apologize for the bold print. It is unintentional from the cut/paste.

I uninstalled the wheel package, then re-installed without the cached directory. I'm getting the same error from awscrt setup.py:

root@sama5d2-xplained:~# pip3 uninstall wheel
Found existing installation: wheel 0.36.2
Uninstalling wheel-0.36.2:
  Would remove:
    /usr/bin/wheel
    /usr/lib/python3.8/site-packages/wheel-0.36.2.dist-info/*
    /usr/lib/python3.8/site-packages/wheel/*
Proceed (y/n)? y
  Successfully uninstalled wheel-0.36.2
root@sama5d2-xplained:~# pip3 install --no-cache-dir wheel
Collecting wheel
  Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
Successfully installed wheel-0.36.2
root@sama5d2-xplained:~# pip3 install --no-cache-dir awsiotsdk
Collecting awsiotsdk
  Downloading awsiotsdk-1.5.4-py3-none-any.whl (37 kB)
Collecting awscrt==0.9.15
  Downloading awscrt-0.9.15.tar.gz (2.6 MB)
     |████████████████████████████████| 2.6 MB 375 kB/s
Building wheels for collected packages: awscrt
  Building wheel for awscrt (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/setup.py'"'"'; __file__='"'"'/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/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 /var/volatile/tmp/pip-wheel-seg3_jmq
       cwd: /var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/
  Complete output (49 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-3.8
  creating build/lib.linux-armv7l-3.8/awscrt
  copying awscrt/mqtt.py -> build/lib.linux-armv7l-3.8/awscrt
  copying awscrt/io.py -> build/lib.linux-armv7l-3.8/awscrt
  copying awscrt/http.py -> build/lib.linux-armv7l-3.8/awscrt
  copying awscrt/exceptions.py -> build/lib.linux-armv7l-3.8/awscrt
  copying awscrt/crypto.py -> build/lib.linux-armv7l-3.8/awscrt
  copying awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-armv7l-3.8/awscrt
  copying awscrt/auth.py -> build/lib.linux-armv7l-3.8/awscrt
  copying awscrt/__init__.py -> build/lib.linux-armv7l-3.8/awscrt
  creating build/lib.linux-armv7l-3.8/awscrt/eventstream
  copying awscrt/eventstream/rpc.py -> build/lib.linux-armv7l-3.8/awscrt/eventstream
  copying awscrt/eventstream/__init__.py -> build/lib.linux-armv7l-3.8/awscrt/eventstream
  running build_ext
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/setup.py", line 300, in <module>
      setuptools.setup(
    File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/setup.py", line 234, in run
      self._build_dependency(lib, libcrypto_paths)
    File "/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/setup.py", line 170, in _build_dependency
      cmake = get_cmake_path()
    File "/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/setup.py", line 90, in get_cmake_path
      raise Exception("CMake must be installed to build from source.")
  Exception: CMake must be installed to build from source.
  ----------------------------------------
  ERROR: Failed building wheel for awscrt
  Running setup.py clean for awscrt
Failed to build awscrt
Installing collected packages: awscrt, awsiotsdk
    Running setup.py install for awscrt ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/setup.py'"'"'; __file__='"'"'/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /var/volatile/tmp/pip-record-wv18fdfi/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/awscrt
         cwd: /var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/
    Complete output (51 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-3.8
    creating build/lib.linux-armv7l-3.8/awscrt
    copying awscrt/mqtt.py -> build/lib.linux-armv7l-3.8/awscrt
    copying awscrt/io.py -> build/lib.linux-armv7l-3.8/awscrt
    copying awscrt/http.py -> build/lib.linux-armv7l-3.8/awscrt
    copying awscrt/exceptions.py -> build/lib.linux-armv7l-3.8/awscrt
    copying awscrt/crypto.py -> build/lib.linux-armv7l-3.8/awscrt
    copying awscrt/awsiot_mqtt_connection_builder.py -> build/lib.linux-armv7l-3.8/awscrt
    copying awscrt/auth.py -> build/lib.linux-armv7l-3.8/awscrt
    copying awscrt/__init__.py -> build/lib.linux-armv7l-3.8/awscrt
    creating build/lib.linux-armv7l-3.8/awscrt/eventstream
    copying awscrt/eventstream/rpc.py -> build/lib.linux-armv7l-3.8/awscrt/eventstream
    copying awscrt/eventstream/__init__.py -> build/lib.linux-armv7l-3.8/awscrt/eventstream
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/setup.py", line 300, in <module>
        setuptools.setup(
      File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.8/distutils/command/install.py", line 547, in run
        self.run_command('build')
      File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/setup.py", line 234, in run
        self._build_dependency(lib, libcrypto_paths)
      File "/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/setup.py", line 170, in _build_dependency
        cmake = get_cmake_path()
      File "/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/setup.py", line 90, in get_cmake_path
        raise Exception("CMake must be installed to build from source.")
    Exception: CMake must be installed to build from source.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/setup.py'"'"'; __file__='"'"'/var/volatile/tmp/pip-install-n38cf3se/awscrt_af1167e332a34ee6972c5235d773a8c0/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /var/volatile/tmp/pip-record-wv18fdfi/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/awscrt Check the logs for full command output.
root@sama5d2-xplained:~#
JonathanHenson commented 3 years ago

right:

"Collecting awscrt==0.9.15 Downloading awscrt-0.9.15.tar.gz (2.6 MB) |████████████████████████████████| 2.6 MB 375 kB/s Building wheels for collected packages: awscrt"

It's not grabbing the wheel, that's the source, and then it's running bdist_wheel to build it

JonathanHenson commented 3 years ago

anyhow, install cmake and it will move to the next thing to fail, which will be the part where you try to link against a libcrypto.a that was built without -fPIC. We can get you unblocked on this while we figure out why the wheel isn't getting pulled.

rpcme commented 3 years ago

@elockman can you try using meta-aws layer in your Yocto build? Simply add aws-iot-device-sdk-python-v2 to your local.conf? Any issues with that please post to the meta-aws Issues.

https://github.com/aws/meta-aws

elockman commented 3 years ago

EDITED REPLY:

@rpcme I have a meta/aws layer in the yocto build, with:

git clone git://github.com/aws/meta-aws -b dunfell yocto/meta-aws

but it appears it wasn't built into the image because there aren't any dependencies asking for it.

I didn't realize there was a recipe for aws-iot-device-sdk-python-v2, but I found it here:

https://layers.openembedded.org/layerindex/recipe/120360/

I added the recipe to local.conf with

CORE_IMAGE_EXTRA_INSTALL += "aws-iot-device-sdk-python-v2"

After Flashing the new image, this is what I see for aws python packages:

root@sama5d2-xplained:/usr/lib/python3.8/site-packages# ls | grep aws _awscrt.cpython-38-arm-linux-gnueabi.so awscrt awscrt-0.5.11-py3.8.egg-info awsiot awsiotsdk-1.0.0.dev0-py3.8.egg-info

Pypi shows version 1.5.4 available. This looks like an old version, validating with:

root@sama5d2-xplained:/usr/lib/python3.8/site-packages# pip3 show awscrt | grep Version Version: 0.5.11 root@sama5d2-xplained:/usr/lib/python3.8/site-packages# pip3 show awsiotsdk | grep Version Version: 1.0.0.dev0

Should I be using a different yocto recipe?

I'll copy the issue into META-AWS

elockman commented 3 years ago

@JonathanHenson

Should the builder.json file include manylinux/post_build_steps for python 3.8 and python 3.9? Or is it possible my gcc version is causing a problem with grabbing the wheel files?

root@sama5d2-xplained:~# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/arm-poky-linux-gnueabi/9.3.0/lto-wrapper Target: arm-poky-linux-gnueabi Configured with: ../../../../../../work-shared/gcc-9.3.0-r0/gcc-9.3.0/configure --build=x86_64-linux --host=arm-poky-linux-gnueabi --target=arm-poky-linux-gnueabi --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/ --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-default-pie --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-poky-linux-gnueabi- --without-local-prefix --disable-install-libiberty --enable-lto --disable-libssp --enable-libitm --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --without-isl --with-float=hard --with-build-sysroot=/ --enable-nls --with-glibc-version=2.28 --enable-initfini-array --with-arch=armv7-a+fp Thread model: posix gcc version 9.3.0 (GCC)

https://github.com/aws/aws-iot-device-sdk-python-v2/blob/main/builder.json

farzadpanahi commented 3 years ago

Same problem here.

Python 3.7.3
Linux 5.10.16 armv7l GNU/Linux
pip 21.0.1
wheel 0.36.2
Raspberry Pi

It looks like it does not pull the wheel for awscrt and is trying to build from source. Any workaround?

$ pip install --no-cache-dir awscrt
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting awscrt
  Downloading awscrt-0.11.5.tar.gz (29.0 MB)
     |████████████████████████████████| 29.0 MB 3.8 MB/s 
Building wheels for collected packages: awscrt
  Building wheel for awscrt (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/farzad/repos/rtu-agent-iot/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/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-fi0e2eyf
       cwd: /tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/
  Complete output (78 lines):
  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/crypto.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/common.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/auth.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/__init__.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/s3.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/mqtt.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/exceptions.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/http.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/io.py -> build/lib.linux-armv7l-3.7/awscrt
  creating build/lib.linux-armv7l-3.7/awscrt/eventstream
  copying awscrt/eventstream/rpc.py -> build/lib.linux-armv7l-3.7/awscrt/eventstream
  copying awscrt/eventstream/__init__.py -> build/lib.linux-armv7l-3.7/awscrt/eventstream
  running build_ext
  --- Building dependency: aws-lc (RelWithDebInfo) ---
  /usr/local/bin/cmake -DCMAKE_PREFIX_PATH=/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/build/deps/install -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/build/deps/install -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_LIBSSL=OFF /tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/crt/aws-lc
  -- 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
  -- Found Perl: /usr/bin/perl (found version "5.28.1")
  -- Checking for module 'libunwind-generic'
  --   No package 'libunwind-generic' found
  libunwind not found. Disabling unwind tests.
  -- Go not found. Disabling some code generation and using pre-generated code in generated-src/
  -- The ASM compiler identification is GNU
  -- Found assembler: /usr/bin/cc
  CMake Error at CMakeLists.txt:660 (add_subdirectory):
    add_subdirectory given source "util/fipstools/cavp" which is not an
    existing directory.

  CMake Error at CMakeLists.txt:661 (add_subdirectory):
    add_subdirectory given source "util/fipstools/acvp/modulewrapper" which is
    not an existing directory.

  -- Configuring incomplete, errors occurred!
  See also "/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/build/deps/aws-lc/CMakeFiles/CMakeOutput.log".
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/setup.py", line 280, in <module>
      'boto3'
    File "/home/farzad/repos/rtu-agent-iot/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 153, 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 "/home/farzad/repos/rtu-agent-iot/venv/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, 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-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/setup.py", line 194, in run
      self._build_dependency(lib)
    File "/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/setup.py", line 175, 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 '['/usr/local/bin/cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/build/deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_POSITION_INDEPENDENT_CODE=ON', '-DBUILD_LIBSSL=OFF', '/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/crt/aws-lc']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for awscrt
  Running setup.py clean for awscrt
Failed to build awscrt
Installing collected packages: awscrt
    Running setup.py install for awscrt ... error
    ERROR: Command errored out with exit status 1:
     command: /home/farzad/repos/rtu-agent-iot/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/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-y5cno8k9/install-record.txt --single-version-externally-managed --compile --install-headers /home/farzad/repos/rtu-agent-iot/venv/include/site/python3.7/awscrt
         cwd: /tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/
    Complete output (69 lines):
    running install
    running build
    running build_py
    creating build/lib.linux-armv7l-3.7
    creating build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/crypto.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/common.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/auth.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/__init__.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/s3.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/mqtt.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/exceptions.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/http.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/io.py -> build/lib.linux-armv7l-3.7/awscrt
    creating build/lib.linux-armv7l-3.7/awscrt/eventstream
    copying awscrt/eventstream/rpc.py -> build/lib.linux-armv7l-3.7/awscrt/eventstream
    copying awscrt/eventstream/__init__.py -> build/lib.linux-armv7l-3.7/awscrt/eventstream
    running build_ext
    --- Building dependency: aws-lc (RelWithDebInfo) ---
    /usr/local/bin/cmake -DCMAKE_PREFIX_PATH=/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/build/deps/install -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/build/deps/install -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_LIBSSL=OFF /tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/crt/aws-lc
    -- Checking for module 'libunwind-generic'
    --   No package 'libunwind-generic' found
    libunwind not found. Disabling unwind tests.
    -- Go not found. Disabling some code generation and using pre-generated code in generated-src/
    CMake Error at CMakeLists.txt:660 (add_subdirectory):
      add_subdirectory given source "util/fipstools/cavp" which is not an
      existing directory.

    CMake Error at CMakeLists.txt:661 (add_subdirectory):
      add_subdirectory given source "util/fipstools/acvp/modulewrapper" which is
      not an existing directory.

    -- Configuring incomplete, errors occurred!
    See also "/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/build/deps/aws-lc/CMakeFiles/CMakeOutput.log".
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/setup.py", line 280, in <module>
        'boto3'
      File "/home/farzad/repos/rtu-agent-iot/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 153, 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 "/home/farzad/repos/rtu-agent-iot/venv/lib/python3.7/site-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-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/setup.py", line 194, in run
        self._build_dependency(lib)
      File "/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/setup.py", line 175, 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 '['/usr/local/bin/cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/build/deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_POSITION_INDEPENDENT_CODE=ON', '-DBUILD_LIBSSL=OFF', '/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/crt/aws-lc']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/farzad/repos/rtu-agent-iot/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5khf24c9/awscrt_871d4f019d1f47bd872329971bb95973/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-y5cno8k9/install-record.txt --single-version-externally-managed --compile --install-headers /home/farzad/repos/rtu-agent-iot/venv/include/site/python3.7/awscrt Check the logs for full command output.
farzadpanahi commented 3 years ago

I can see why now. piwheels.org does not have awscrt 0.11.x versions:

https://www.piwheels.org/project/awscrt/

I think that's why pi is downloading the source and trying to build. Are there any other wheel repos we can use for awscrt?

farzadpanahi commented 3 years ago

I also installed cmake and libssl-dev but still cannot build:

$ pip install awsiotsdk
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting awsiotsdk
  Using cached https://www.piwheels.org/simple/awsiotsdk/awsiotsdk-1.5.10-py3-none-any.whl (42 kB)
Collecting awscrt==0.11.4
  Using cached awscrt-0.11.4.tar.gz (29.0 MB)
Building wheels for collected packages: awscrt
  Building wheel for awscrt (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/farzad/repos/rtu-agent-iot/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/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-cr8sz5cx
       cwd: /tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/
  Complete output (78 lines):
  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/crypto.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/common.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/auth.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/__init__.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/s3.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/mqtt.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/exceptions.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/http.py -> build/lib.linux-armv7l-3.7/awscrt
  copying awscrt/io.py -> build/lib.linux-armv7l-3.7/awscrt
  creating build/lib.linux-armv7l-3.7/awscrt/eventstream
  copying awscrt/eventstream/rpc.py -> build/lib.linux-armv7l-3.7/awscrt/eventstream
  copying awscrt/eventstream/__init__.py -> build/lib.linux-armv7l-3.7/awscrt/eventstream
  running build_ext
  --- Building dependency: aws-lc (RelWithDebInfo) ---
  /usr/local/bin/cmake -DCMAKE_PREFIX_PATH=/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/build/deps/install -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/build/deps/install -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_LIBSSL=OFF /tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/crt/aws-lc
  -- 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
  -- Found Perl: /usr/bin/perl (found version "5.28.1")
  -- Checking for module 'libunwind-generic'
  --   No package 'libunwind-generic' found
  libunwind not found. Disabling unwind tests.
  -- Go not found. Disabling some code generation and using pre-generated code in generated-src/
  -- The ASM compiler identification is GNU
  -- Found assembler: /usr/bin/cc
  CMake Error at CMakeLists.txt:660 (add_subdirectory):
    add_subdirectory given source "util/fipstools/cavp" which is not an
    existing directory.

  CMake Error at CMakeLists.txt:661 (add_subdirectory):
    add_subdirectory given source "util/fipstools/acvp/modulewrapper" which is
    not an existing directory.

  -- Configuring incomplete, errors occurred!
  See also "/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/build/deps/aws-lc/CMakeFiles/CMakeOutput.log".
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/setup.py", line 280, in <module>
      'boto3'
    File "/home/farzad/repos/rtu-agent-iot/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 153, 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 "/home/farzad/repos/rtu-agent-iot/venv/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, 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-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/setup.py", line 194, in run
      self._build_dependency(lib)
    File "/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/setup.py", line 175, 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 '['/usr/local/bin/cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/build/deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_POSITION_INDEPENDENT_CODE=ON', '-DBUILD_LIBSSL=OFF', '/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/crt/aws-lc']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for awscrt
  Running setup.py clean for awscrt
Failed to build awscrt
Installing collected packages: awscrt, awsiotsdk
    Running setup.py install for awscrt ... error
    ERROR: Command errored out with exit status 1:
     command: /home/farzad/repos/rtu-agent-iot/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/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-7bo6whka/install-record.txt --single-version-externally-managed --compile --install-headers /home/farzad/repos/rtu-agent-iot/venv/include/site/python3.7/awscrt
         cwd: /tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/
    Complete output (69 lines):
    running install
    running build
    running build_py
    creating build/lib.linux-armv7l-3.7
    creating build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/crypto.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/common.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/auth.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/__init__.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/s3.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/mqtt.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/exceptions.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/http.py -> build/lib.linux-armv7l-3.7/awscrt
    copying awscrt/io.py -> build/lib.linux-armv7l-3.7/awscrt
    creating build/lib.linux-armv7l-3.7/awscrt/eventstream
    copying awscrt/eventstream/rpc.py -> build/lib.linux-armv7l-3.7/awscrt/eventstream
    copying awscrt/eventstream/__init__.py -> build/lib.linux-armv7l-3.7/awscrt/eventstream
    running build_ext
    --- Building dependency: aws-lc (RelWithDebInfo) ---
    /usr/local/bin/cmake -DCMAKE_PREFIX_PATH=/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/build/deps/install -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/build/deps/install -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_LIBSSL=OFF /tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/crt/aws-lc
    -- Checking for module 'libunwind-generic'
    --   No package 'libunwind-generic' found
    libunwind not found. Disabling unwind tests.
    -- Go not found. Disabling some code generation and using pre-generated code in generated-src/
    CMake Error at CMakeLists.txt:660 (add_subdirectory):
      add_subdirectory given source "util/fipstools/cavp" which is not an
      existing directory.

    CMake Error at CMakeLists.txt:661 (add_subdirectory):
      add_subdirectory given source "util/fipstools/acvp/modulewrapper" which is
      not an existing directory.

    -- Configuring incomplete, errors occurred!
    See also "/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/build/deps/aws-lc/CMakeFiles/CMakeOutput.log".
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/setup.py", line 280, in <module>
        'boto3'
      File "/home/farzad/repos/rtu-agent-iot/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 153, 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 "/home/farzad/repos/rtu-agent-iot/venv/lib/python3.7/site-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-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/setup.py", line 194, in run
        self._build_dependency(lib)
      File "/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/setup.py", line 175, 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 '['/usr/local/bin/cmake', '-DCMAKE_PREFIX_PATH=/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/build/deps/install', '-DCMAKE_INSTALL_PREFIX=/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/build/deps/install', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_TESTING=OFF', '-DCMAKE_POSITION_INDEPENDENT_CODE=ON', '-DBUILD_LIBSSL=OFF', '/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/crt/aws-lc']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/farzad/repos/rtu-agent-iot/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yz7o2kjw/awscrt_881f1a9ccd064b12bc625b9ad988fd97/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-7bo6whka/install-record.txt --single-version-externally-managed --compile --install-headers /home/farzad/repos/rtu-agent-iot/venv/include/site/python3.7/awscrt Check the logs for full command output.
jmklix commented 3 years ago

@farzadpanahi I think the cause of your issues are different and more related to this issue. If you use the latest release then your pip install should work without error.

farzadpanahi commented 3 years ago

@jmklix you are right. I can see that now we have wheels for awscrt starting on version 0.11.7 today -> https://www.piwheels.org/project/awscrt/

Everything is working fine for me now.

github-actions[bot] commented 3 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

graebm commented 3 years ago

"CMake must be installed to build from source."

ankurjana commented 3 years ago

Hello All, I still have the issue, kindly see the error below,

C:\WINDOWS\system32>pip install awsiotsdk Collecting awsiotsdk Using cached awsiotsdk-1.5.11-py3-none-any.whl (42 kB) Collecting awscrt==0.11.8 Using cached awscrt-0.11.8.tar.gz (18.5 MB) Building wheels for collected packages: awscrt Building wheel for awscrt (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:\users\ankur\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py'"'"'; file='"'"'C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\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 'C:\Users\ankur\AppData\Local\Temp\pip-wheel-gpnxs69q' cwd: C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\ Complete output (64 lines): running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.9 creating build\lib.win-amd64-3.9\awscrt copying awscrt\auth.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\common.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\crypto.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\exceptions.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\http.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\io.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\mqtt.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\s3.py -> build\lib.win-amd64-3.9\awscrt copying awscrt__init.py -> build\lib.win-amd64-3.9\awscrt creating build\lib.win-amd64-3.9\awscrt\eventstream copying awscrt\eventstream\rpc.py -> build\lib.win-amd64-3.9\awscrt\eventstream copying awscrt\eventstream\init__.py -> build\lib.win-amd64-3.9\awscrt\eventstream running build_ext Traceback (most recent call last): File "C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py", line 41, in determine_generator_args compiler.initialize() File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils_msvccompiler.py", line 220, in initialize vc_env = _get_vc_env(plat_spec) File "c:\users\ankur\appdata\local\programs\python\python39\lib\site-packages\setuptools\msvc.py", line 314, in msvc14_get_vc_env return _msvc14_get_vc_env(plat_spec) File "c:\users\ankur\appdata\local\programs\python\python39\lib\site-packages\setuptools\msvc.py", line 268, in _msvc14_get_vc_env raise distutils.errors.DistutilsPlatformError( distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py", line 263, in setuptools.setup( File "c:\users\ankur\appdata\local\programs\python\python39\lib\site-packages\setuptools__init__.py", line 165, in setup return distutils.core.setup(**attrs) File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\core.py", line 148, in setup dist.run_commands() File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "c:\users\ankur\appdata\local\programs\python\python39\lib\site-packages\wheel\bdist_wheel.py", line 299, in run self.run_command('build') File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py", line 197, in run self._build_dependency(lib) File "C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py", line 160, in _build_dependency cmake_args.extend(determine_generator_args()) File "C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py", line 58, in determine_generator_args raise RuntimeError('No supported version of MSVC compiler could be found!') RuntimeError: No supported version of MSVC compiler could be found! --- Building dependency: aws-c-common (RelWithDebInfo) ---

ERROR: Failed building wheel for awscrt Running setup.py clean for awscrt Failed to build awscrt Installing collected packages: awscrt, awsiotsdk Running setup.py install for awscrt ... error ERROR: Command errored out with exit status 1: command: 'c:\users\ankur\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py'"'"'; file='"'"'C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\ankur\AppData\Local\Temp\pip-record-i32ag81c\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\ankur\appdata\local\programs\python\python39\Include\awscrt' cwd: C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\ Complete output (65 lines): running install running build running build_py creating build\lib.win-amd64-3.9 creating build\lib.win-amd64-3.9\awscrt copying awscrt\auth.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\common.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\crypto.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\exceptions.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\http.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\io.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\mqtt.py -> build\lib.win-amd64-3.9\awscrt copying awscrt\s3.py -> build\lib.win-amd64-3.9\awscrt copying awscrt__init.py -> build\lib.win-amd64-3.9\awscrt creating build\lib.win-amd64-3.9\awscrt\eventstream copying awscrt\eventstream\rpc.py -> build\lib.win-amd64-3.9\awscrt\eventstream copying awscrt\eventstream\init__.py -> build\lib.win-amd64-3.9\awscrt\eventstream running build_ext Traceback (most recent call last): File "C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py", line 41, in determine_generator_args compiler.initialize() File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils_msvccompiler.py", line 220, in initialize vc_env = _get_vc_env(plat_spec) File "c:\users\ankur\appdata\local\programs\python\python39\lib\site-packages\setuptools\msvc.py", line 314, in msvc14_get_vc_env return _msvc14_get_vc_env(plat_spec) File "c:\users\ankur\appdata\local\programs\python\python39\lib\site-packages\setuptools\msvc.py", line 268, in _msvc14_get_vc_env raise distutils.errors.DistutilsPlatformError( distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py", line 263, in <module>
    setuptools.setup(
  File "c:\users\ankur\appdata\local\programs\python\python39\lib\site-packages\setuptools\__init__.py", line 165, in setup
    return distutils.core.setup(**attrs)
  File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\ankur\appdata\local\programs\python\python39\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\command\install.py", line 546, in run
    self.run_command('build')
  File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\ankur\appdata\local\programs\python\python39\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py", line 197, in run
    self._build_dependency(lib)
  File "C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py", line 160, in _build_dependency
    cmake_args.extend(determine_generator_args())
  File "C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py", line 58, in determine_generator_args
    raise RuntimeError('No supported version of MSVC compiler could be found!')
RuntimeError: No supported version of MSVC compiler could be found!
--- Building dependency: aws-c-common (RelWithDebInfo) ---
----------------------------------------

ERROR: Command errored out with exit status 1: 'c:\users\ankur\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py'"'"'; file='"'"'C:\Users\ankur\AppData\Local\Temp\pip-install-w6ae4i98\awscrt_60ef668c09494f9988310497e1da9df1\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\ankur\AppData\Local\Temp\pip-record-i32ag81c\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\ankur\appdata\local\programs\python\python39\Include\awscrt' Check the logs for full command output.

chleiva-aws commented 2 years ago

I just experienced the same problem, just installed CMake and make it available in PATH, solved the problem!