IBM / ibm-cos-sdk-python-core

ibm-cos-sdk-python-core
Apache License 2.0
6 stars 14 forks source link

Import is not working for Python 3 #1

Closed svenhafeneger closed 6 years ago

svenhafeneger commented 7 years ago

When I execute this import statement import boto3 in Python 3, I get the following error stack trace:

4 import boto3
      5 
      6 # @hidden_cell

/gpfs/fs01/user/USER_ID/.local/lib/python3.5/site-packages/boto3/__init__.py in <module>()
     14 import logging
     15 
---> 16 from boto3.session import Session
     17 
     18 

/gpfs/fs01/user/USER_ID/.local/lib/python3.5/site-packages/boto3/session.py in <module>()
     25 import os
     26 
---> 27 import botocore.session
     28 from botocore.client import Config
     29 from botocore.exceptions import DataNotFoundError, UnknownServiceError

/gpfs/fs01/user/USER_ID/.local/lib/python3.5/site-packages/botocore/session.py in <module>()
     35 from botocore import __version__
     36 import botocore.configloader
---> 37 import botocore.credentials
     38 import botocore.client
     39 from botocore.exceptions import ConfigNotFound, ProfileNotFound

/gpfs/fs01/user/USER_ID/.local/lib/python3.5/site-packages/botocore/credentials.py in <module>()
     25 import time
     26 import datetime
---> 27 import httplib
     28 import json
     29 import logging

ImportError: No module named 'httplib'

It looks like it is working for Python 2, only.

svenhafeneger commented 7 years ago

This could work for Python 2 and 3: https://github.com/boto/botocore/blob/c632931a6cc5eab4113c976d430bcb9c059f829f/botocore/vendored/requests/packages/urllib3/response.py#L1-L4

zhuojc commented 6 years ago

This issues is being tracked internally and will be resolved in the next patch.

wbhuberIBM commented 6 years ago

@svenhafeneger Python 3 is now supported since 1.0.2 version.