Python模块Scrapy导入出错:ImportError: cannot import name xmlrpc_client

Mac(OS version: OS X Yosemite 10.10.5)上安装Scrapy模块,使用时出现:

from six.moves import xmlrpc_client as xmlrpclib

ImportError: cannot import name xmlrpc_client

错误

解决方法:

sudo rm -rf /Library/Python/2.7/site-packages/six*
sudo rm -rf /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six*
sudo pip install six
解决方法来自stackflow: 点击打开链接

在win7系统上安装倒没出现这种错误.

你可能感兴趣的:(Python)