python3 导入 from urllib import ur

2018-06-19  本文已影响1人  Al_不期而遇

在python3的版本中导入

from urllib import urlencode

出现如下错误

cannot import name 'urlencode'

这是因为from urllib import urlencode是python2的导入方式

python3导入方式from urllib.parse import urlencode

上一篇 下一篇

猜你喜欢

热点阅读