【发布时间】:2015-08-05 06:19:21
【问题描述】:
我买了一个新的 macbook,我对 mac os 很陌生。但是,我在互联网上阅读了很多关于如何安装废品的信息
我什么都做了,但我在安装 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 调用这个词时,我收到了这个错误消息
ImportError: No module named lxml.html
请问我该怎么办?
欢迎提出任何建议
【问题讨论】:
-
我认为这是一个重复的问题。你可以在 [这里][1] 找到你的答案。这也可能是help center[2]。 [1]:stackoverflow.com/questions/10666578/…
-
@DarKnight 您提供的链接表明我必须转到 Xcode 然后首选项然后下载并下载命令行工具。但是,我去了那里并没有命令行工具。操作系统和一些 iOS 模拟器需要安装一些更新
标签: python macos python-2.7 scrapy lxml