I'm trying to use scrape on Mac OS X EI, and I have successfully installed scrapy using
pip install scrapy
in the terminal. After that, I met the above problem when I tried to "import scrapy" in the Pycharm:
Traceback (most recent call last):
File "/Users/ziyuan/PycharmProjects/untitled/en.py", line 1, in <module>
import scrape
File "/Library/Python/2.7/site-packages/scrapy/__init__.py", line 48, in <module>
from scrapy.spiders import Spider
File "/Library/Python/2.7/site-packages/scrapy/spiders/__init__.py", line 10, in <module>
from scrapy.http import Request
File "/Library/Python/2.7/site-packages/scrapy/http/__init__.py", line 12, in <module>
from scrapy.http.request.rpc import XmlRpcRequest
File "/Library/Python/2.7/site-packages/scrapy/http/request/rpc.py", line 7, in <module>
from six.moves import xmlrpc_client as xmlrpclib
ImportError: cannot import name xmlrpc_client
And I have tried everything from Scrapy throws ImportError: cannot import name xmlrpc_client
Specifically, when I tried the highest-voted solution, the second line
sudo rm -rf/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six*
throwed me another problem:
rm: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info: Operation not permitted
rm: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.py: Operation not permitted
rm: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.pyc: Operation not permitted
What should I do now? I have searched it in google for a long time and I really have no idea now.