002_关于six版本过低报cannot import name urllib_parse的问题

时间:2021-04-13 21:45:21

一、

参考:https://github.com/Parsely/pykafka/issues/222

[root@jyall.com tmp]#python check.py   #报错如下
Traceback (most recent call last):
File "check.py", line 3, in <module>
from kazoo.client import KazooClient
File "/usr/lib/python2.7/site-packages/kazoo/client.py", line 25, in <module>
from kazoo.hosts import collect_hosts
File "/usr/lib/python2.7/site-packages/kazoo/hosts.py", line 1, in <module>
from six.moves import urllib_parse
ImportError: cannot import name urllib_parse [root@jyall.com tmp]# sudo pip install six==1.9.0
Collecting six==1.9.0
InsecurePlatformWarning
Downloading six-1.9.0-py2.py3-none-any.whl
Installing collected packages: six
Found existing installation: six 1.3.0 Uninstalling six-1.3.0:
Successfully uninstalled six-1.3.0
Successfully installed six-1.9.0

二、