Python 3 ImportError: no se puede importar el nombre 'Config' al importar boto3 después de instalar con pip3

Actualmente intento configurar Python3 correctamente con boto3 para utilizar el SDK de Python de AWS Dynamo. Usé HomeBrew para instalar Python3 y luego instalé pip y pip3 para mis versiones python 2 y python 3 respectivamente.

También instalé boto y boto3 para Python2 y 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 "<string>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/boto3/__init__.py", line 16, in <module>
    from boto3.session import Session
  File "/usr/local/lib/python3.6/site-packages/boto3/session.py", line 18, in <module>
    from botocore.client import Config
ImportError: cannot import name 'Config'

Pero es Python 3 el que me está dando el problema, como puede 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 totalmente bien 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.

Respuestas (1)

Funcionará si instala específicamente Python 3.5, no estoy seguro de si lo han actualizado para 3.6 todavía, pero recientemente era incompatible con él.

Esto no funcionó para mí. Eliminé todas las versiones Homebrew existentes de Python e instalé Python 3.5 usando este toque: github.com/sashkab/homebrew-python . El mismo problema.
Eso instala 3.5.5. Sin embargo, puede ser que estuviera usando una versión anterior 3.5 que ya no puedo verificar. La página oficial de AWS dice que es totalmente compatible con 3.4 aws.amazon.com/about-aws/whats-new/2015/06/… pero me gustaría pensar que ahora está desactualizado. Sin embargo, definitivamente funciona con algunas versiones, por lo que puede ser un caso de prueba y error dependiendo de la funcionalidad de lanzamiento de Python que desee idealmente.