Unable to install aws-cli via pip - package dependency broke
Problem
Describe the bug $ pip3 install awscli Collecting awscli Obtaining dependency information for awscli from https://files.pythonhosted.org/packages/43/9c/bf16d97f5de8aa4f9171c6c82bad0b4179921ddca5066ba980358da0e9a5/awscli-1.29.3-py3-none-any.whl.metadata Downloading awscli-1.29.3-py3-none-any.whl.metadata (11 kB) Collecting botocore==1.31.3 (from awscli) Obtaining dependency information for botocore==1.31.3 from https://files.pythonhosted.org/packages/b0/f0/5755508b3305534cd4cf2a8a82bbbe42ee9d66fd2688be5ff3dfb85e9a99/botocore-1.31.3-py3-none-any.whl.metadata Downloading botocore-1.31.3-py3-none-any.whl.metadata (5.9 kB) Collecting docutils<0.17,>=0.10 (from awscli) Downloading docutils-0.16-py2.py3-none-any.whl (548 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 548.2/548.2 kB 34.8 MB/s eta 0:00:00 Collecting s3transfer<0.7.0,>=0.6.0 (from awscli) Downloading s3transfer-0.6.1-py3-none-any.whl (79 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.8/79.8 kB 12.2 MB/s eta 0:00:00 Collecting PyYAML<5.5,>=3.10 (from awscli) Downloading PyYAML-5.4.1.tar.gz (175 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.1/175.1 kB 24.9 MB/s eta 0:00:00 Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'error' error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully.
Error Output
error: subprocess-exited-with-error
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Resolve aws-cli Installation Dependency Issues
The installation of aws-cli via pip is failing due to incompatible package dependencies, specifically with PyYAML. The version of PyYAML required by aws-cli is less than 5.5, and the build process for PyYAML is encountering an error when trying to compile the wheel.
Awaiting Verification
Be the first to verify this fix
- 1
Upgrade pip and setuptools
Ensure that pip and setuptools are up to date to avoid compatibility issues during installation.
bashpip install --upgrade pip setuptools - 2
Install PyYAML separately
Manually install a compatible version of PyYAML before installing awscli to bypass the build issue.
bashpip install PyYAML==5.4.1 - 3
Install awscli
Now that the dependencies are resolved, proceed to install awscli.
bashpip install awscli - 4
Verify installation
Check if awscli is installed correctly by running the version command.
bashaws --version
Validation
Confirm that the awscli command returns the installed version without errors. If it shows the version number, the installation was successful.
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep