TencentYouTu / python_sdk

python_sdk for TencentYoutuyun-person-face-service
MIT License
65 stars 23 forks source link

Can't use the SDK in Python3 #1

Open shiquanwang opened 8 years ago

shiquanwang commented 8 years ago
IPython 4.0.3 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import TencentYoutuyun
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-a7c83d26707f> in <module>()
----> 1 import TencentYoutuyun

/home/sqwang/workspace/project/github/TencentYouTu/python_sdk/TencentYoutuyun/__init__.py in <module>()
      1 # -*- coding: utf-8 -*-
      2 
----> 3 from .youtu import YouTu
      4 from .auth  import Auth
      5 

/home/sqwang/workspace/project/github/TencentYouTu/python_sdk/TencentYoutuyun/youtu.py in <module>()
      7 import json
      8 from TencentYoutuyun import conf
----> 9 from .auth import Auth
     10 
     11 class YouTu(object):

/home/sqwang/workspace/project/github/TencentYouTu/python_sdk/TencentYoutuyun/auth.py in <module>()
      6 import binascii
      7 import base64
----> 8 import urlparse
      9 from TencentYoutuyun import conf
     10 

ImportError: No module named 'urlparse'
ghost commented 8 years ago

sorry, here not support python3 yet~

lby1992 commented 8 years ago

可以使用2to3工具对TencentYoutuyun/auth.py进行源码翻译,用法2to3 -w TencentYoutuyun/auth.py