Actualmente estoy tratando de configurar Python3 correctamente con boto3 para utilizar el SDK de Python AWS Dynamo. He utilizado HomeBrew para instalar Python3 y luego he instalado pip y pip3 para mis versiones de Python 2 y Python 3 respectivamente.
También he instalado boto y boto3 tanto para Python2 como para Python3.
workspace: python -c "import boto"
workspace: python -c "import boto3"
workspace: python3 -c "import boto"
workspace: python3 -c "import boto3"
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/site-packages/boto3/__init__.py", line 16, in
from boto3.session import Session
File "/usr/local/lib/python3.6/site-packages/boto3/session.py", line 18, in
from botocore.client import Config
ImportError: cannot import name 'Config'
Pero es Python 3 el que me está dando el problema como puedes ver arriba. Aquí está mi configuración completa:
workspace: which python
/usr/bin/python
workspace: which python3
/usr/local/bin/python3
workspace: brew list --versions python3
python3 3.6.0_1
workspace: sudo pip install boto; sudo pip install boto3;
Requirement already satisfied: boto in /Library/Python/2.7/site-packages
Requirement already satisfied: boto3 in /Library/Python/2.7/site-packages
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /Library/Python/2.7/site-packages (from boto3)
Requirement already satisfied: s3transfer<0.2.0,>=0.1.10 in /Library/Python/2.7/site-packages (from boto3)
Requirement already satisfied: botocore<1.6.0,>=1.5.0 in /Library/Python/2.7/site-packages (from boto3)
Requirement already satisfied: futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" in / Library/Python/2.7/site-packages (from s3transfer<0.2.0,>=0.1.10->boto3)
Requirement already satisfied: docutils>=0.10 in /Library/Python/2.7/site-packages (from botocore<1.6.0,>=1.5.0- >boto3)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /Library/Python/2.7/site-packages (from botocore<1.6.0,>=1.5.0->boto3)
Requirement already satisfied: six>=1.5 in /Library/Python/2.7/site-packages (from python-dateutil<3.0.0,>=2.1-> botocore<1.6.0,>=1.5.0->boto3)
workspace: pip3 install boto; pip3 install boto3;
Requirement already satisfied: boto in /usr/local/lib/python3.6/site-packages
Requirement already satisfied: boto3 in /usr/local/lib/python3.6/site-packages
Requirement already satisfied: botocore<1.6.0,>=1.5.0 in /usr/local/lib/python3.6/site-packages (from boto3)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python3.6/site-packages (from boto3)
Requirement already satisfied: s3transfer<0.2.0,>=0.1.10 in /usr/local/lib/python3.6/site-packages (from boto3)
Requirement already satisfied: docutils>=0.10 in /usr/local/lib/python3.6/site-packages (from botocore<1.6.0,>=1.5.0->boto3)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/local/lib/python3.6/site-packages (from botocore<1.6.0,>=1.5.0->boto3)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.6/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.6.0,>=1.5.0->boto3)
Lo frustrante es que boto3 funciona perfectamente en Python 2.7.10 que vino con mi instalación de macOS. Pero me gustaría usar Python 3 y parece que no puedo continuar con él.