我是一名新手,刚买了一台Macbook,对于Mac OS还不太熟悉。然而,我在网络上看到了很多关于如何安装Scrap的文章。
我按照教程做了一切,但在安装lxml时遇到了问题。
我在终端上尝试了以下命令:
pip install lxml
下载了很多东西,终端上出现了很多文本,但是我在终端上看到了这个红色的错误信息。
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Cleaning up...
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/var/folders/rd/fxgsy46j3l77f6l9h_hv2fjm0000gn/T/pip_build_mycomputername/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/rd/fxgsy46j3l77f6l9h_hv2fjm0000gn/T/pip-WvDTPQ-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/rd/fxgsy46j3l77f6l9h_hv2fjm0000gn/T/pip_build_mycomputername/lxml
Storing debug log for failure in /Users/mycomputername/.pip/pip.log
当我使用lxml调用scrapy爬虫时,出现了以下错误信息。
ImportError: No module named lxml.html
请问我该怎么做?
欢迎提供任何建议。