python installing boto3 - could not find a version even though pypi shows th index

Viewed 7321

I got the following error when trying to install boto3 from python on my mac

pip3 install boto
Looking in indexes: https://pypi.org
ERROR: Could not find a version that satisfies the requirement boto (from versions: none)
ERROR: No matching distribution found for boto

When I check on PyPi.org, I see results for boto3 package.

  1. Any reason why this error comes up?
  2. Any other index/option I could use?

I tried downloading the package from github and then installing it from source, but faced the same issue when installing one of the dependencies in boto3/requirements.txt.

3 Answers

I was able to resolve this using a different index by using the --extra-index-url flag.

pip3 install --extra-index-url https://pypi.python.org/simple boto3

Looking in indexes: https://pypi.org, https://pypi.python.org/simple
Collecting boto3
  Downloading boto3-1.17.28-py2.py3-none-any.whl (131 kB)
     |████████████████████████████████| 131 kB 1.1 MB/s
Collecting s3transfer<0.4.0,>=0.3.0
  Downloading s3transfer-0.3.4-py2.py3-none-any.whl (69 kB)
     |████████████████████████████████| 69 kB 2.1 MB/s
Collecting botocore<1.21.0,>=1.20.28
  Downloading botocore-1.20.28-py2.py3-none-any.whl (7.3 MB)
     |████████████████████████████████| 7.3 MB 4.9 MB/s
Collecting jmespath<1.0.0,>=0.7.1
  Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB)
Collecting urllib3<1.27,>=1.25.4
  Downloading urllib3-1.26.4-py2.py3-none-any.whl (153 kB)
     |████████████████████████████████| 153 kB 3.9 MB/s
Collecting python-dateutil<3.0.0,>=2.1
  Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
     |████████████████████████████████| 227 kB 2.3 MB/s
Collecting six>=1.5
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: urllib3, jmespath, six, python-dateutil, botocore, s3transfer, boto3
Successfully installed boto3-1.17.28 botocore-1.20.28 jmespath-0.10.0 python-dateutil-2.8.1 s3transfer-0.3.4 six-1.15.0 urllib3-1.26.4

For me, it was resolved after adding --upgrade.

Final command: pip3 install boto3 --upgrade

Before :

$pip3 install boto3
Collecting boto3
  Using cached boto3-1.21.7-py3-none-any.whl (132 kB)
 ERROR: Could not find a version that satisfies the requirement botocore<1.25.0,>=1.24.7 (from boto3) (from versions: none)
 ERROR: No matching distribution found for botocore<1.25.0,>=1.24.7 (from boto3)
Related