awscrt 설치가 실패합니다.

0

stm32mp135f 보드에서 pip install awscrt 명령어 입력하여 설치를 하려고 했으나, 아래와 같이 에러가 발생합니다.

cmd : pip install awscrt

DEPRECATION: Loading egg at /usr/lib/python3.11/site-packages/awsiotsdk-1.0.0.dev0-py3.11.egg is deprecated. pip 20DEPRECATION: Loading egg at /usr/lib/python3.11/site-packages/AWSIoTPythonSDK-1.5.4-py3.11.egg is deprecated. pip 0 Collecting awscrt Using cached awscrt-0.20.9.tar.gz (32.7 MB) Preparing metadata (setup.py) ... done Building wheels for collected packages: awscrt Building wheel for awscrt (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [75 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-armv7l-cpython-311 creating build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/websocket.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/s3.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/mqtt5.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/mqtt.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/io.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/http.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/exceptions.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/crypto.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/common.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/checksums.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/auth.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/_test.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/init.py -> build/lib.linux-armv7l-cpython-311/awscrt creating build/lib.linux-armv7l-cpython-311/awscrt/eventstream copying awscrt/eventstream/rpc.py -> build/lib.linux-armv7l-cpython-311/awscrt/eventstream copying awscrt/eventstream/init.py -> build/lib.linux-armv7l-cpython-311/awscrt/eventstream running build_ext > /usr/bin/cmake -H/tmp/pip-install-e6yodjtp/awscrt_308c2f7845b64886b00b9fd95e34aac5/crt -Bbuild/temp.linux-o CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM. CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! See also "/tmp/pip-install-e6yodjtp/awscrt_308c2f7845b64886b00b9fd95e34aac5/build/temp.linux-armv7l-cpython-. Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "/tmp/pip-install-e6yodjtp/awscrt_308c2f7845b64886b00b9fd95e34aac5/setup.py", line 399, in <module> setuptools.setup( File "/usr/lib/python3.11/site-packages/setuptools/init.py", line 104, in setup return distutils.core.setup(**attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 184, in setup return run_commands(dist) ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 200, in run_commands dist.run_commands() File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command super().run_command(command) File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/usr/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 368, in run self.run_command("build") File "/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command self.distribution.run_command(command) File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command super().run_command(command) File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 132, in run self.run_command(cmd_name) File "/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command self.distribution.run_command(command) File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command super().run_command(command) File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/tmp/pip-install-e6yodjtp/awscrt_308c2f7845b64886b00b9fd95e34aac5/setup.py", line 263, in run self._build_dependencies(dep_build_dir, dep_install_path) File "/tmp/pip-install-e6yodjtp/awscrt_308c2f7845b64886b00b9fd95e34aac5/setup.py", line 255, in _build_deps self._build_dependencies_impl(build_dir, install_path) File "/tmp/pip-install-e6yodjtp/awscrt_308c2f7845b64886b00b9fd95e34aac5/setup.py", line 203, in _build_depl run_cmd(cmake_args) File "/tmp/pip-install-e6yodjtp/awscrt_308c2f7845b64886b00b9fd95e34aac5/setup.py", line 38, in run_cmd subprocess.check_call(args) File "/usr/lib/python3.11/subprocess.py", line 413, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/usr/bin/cmake', '-H/tmp/pip-install-e6yodjtp/awscrt_308c2f7845b64. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for awscrt Running setup.py clean for awscrt Failed to build awscrt ERROR: Could not build wheels for awscrt, which is required to install pyproject.toml-based projects

3 Answers
0

The error you're encountering when trying to install the awscrt package via pip suggests that some dependencies required for building the package are missing on your system. Specifically, the error messages indicate that CMake and potentially other build tools are not installed.

To resolve this issue, you can follow these steps:

Step 1: Install CMake CMake is a build system generator required for compiling the awscrt package. You need to install it on your system. The installation method will vary depending on your operating system.

On Debian-based systems (e.g., Ubuntu):

sudo apt-get update
sudo apt-get install cmake

On Red Hat-based systems (e.g., CentOS, Fedora):

sudo yum install cmake

On macOS (using Homebrew):

brew install cmake

Step 2: Install Make and a C Compiler The error messages also indicate that CMAKE_MAKE_PROGRAM and the C/C++ compilers are not set. You need to install these as well.

On Debian-based systems:

sudo apt-get install build-essential

On Red Hat-based systems:

sudo yum groupinstall 'Development Tools'

On macOS (using Xcode Command Line Tools):

xcode-select --install

Step 3: Retry Installing awscrt After installing the necessary build tools, try installing the awscrt package again:

pip install awscrt

Step 4: Verify Python and Pip Versions Ensure that you are using compatible versions of Python and pip. The awscrt package should work with Python 3. Ensure you are using the latest version of pip:

pip install --upgrade pip

Summary

By installing CMake, Make, and the necessary C/C++ compilers, you should be able to resolve the build issues and successfully install the awscrt package. If you encounter further issues, please provide more details, and I'll be happy to assist you further.

profile picture
EXPERT
answered 20 days ago
0

I already installed pkg.

root@stm32mp1:/usr/local/pkg# cmake --version cmake version 3.25.2

root@stm32mp1:/usr/local/pkg# gcc --version gcc (Debian 13.2.0-25) 13.2.0

root@stm32mp1:/usr/local/pkg# g++ --version g++ (Debian 13.2.0-25) 13.2.0

can you check plz.

Installing AWS SDK... Processing ./aws-iot-device-sdk-python-v2 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Collecting awscrt==0.20.9 (from awsiotsdk==1.0.0.dev0) Using cached awscrt-0.20.9.tar.gz (32.7 MB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [20 lines of output] Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-r_er07oq/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-r_er07oq/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-r_er07oq/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 487, in run_setup super().run_setup(setup_script=setup_script) File "/tmp/pip-build-env-r_er07oq/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup exec(code, locals()) File "<string>", line 17, in <module> ModuleNotFoundError: No module named 'wheel' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

answered 17 days ago
0

ModuleNotFoundError: No module named 'wheel' [end of output]

try this python -m pip install wheel setuptools

profile picture
EXPERT
answered 17 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions