python使用版本: 3.5
一、版本问题
1、cpickle not defined
3.5版本中cpickle已经改为_pickle(序列化模块),若想继续使用cpickle,可使用import _pickle as pickle代替
语法:
2、reload not defined
3.x版本中reload已经隶属于imp模块,所以你如果继续使用reload 需要使用from imp import reload
3、module 'sys' has no attribute 'setdefaultencoding'
python3.x默认字符编码为unicode,故此属性已经移除
新闻热点
疑难解答