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
遇到错误需要关闭mac sip
If you encounter an error rm: /System/Library/... Operation not permitted

Please try to disable System Integrity Protection
See Operation Not Permitted when on root El capitan (rootless disabled)

关闭Mac sip的方法是
https://www.52mac.com/soft/9464-1-1.html

相关文章:

  • 2021-11-29
  • 2021-12-23
  • 2021-07-27
  • 2021-09-07
  • 2022-12-23
  • 2021-06-20
  • 2021-12-21
猜你喜欢
  • 2021-06-28
  • 2021-10-28
  • 2021-07-28
  • 2022-01-03
  • 2021-12-16
  • 2022-12-23
相关资源
相似解决方案