在目前最新版本下出现问题
F:\p>python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.
#-*- coding: utf-8
import base64
str='cnblogs'
str64=base64.b64encode(str)
print(str64) #Y25ibG9ncw==
print(base64.b64decode(str64)) #cnblogs
就能解决问题。