我正在尝试在我的 Mac Mac OS X El Capitan 中安装 lxml。 (五 - 10.11.6)。 但是我不想在我的 mac 上安装 xcode。
当我尝试使用以下命令时: pip 安装 lxml
我收到错误:错误:命令“cc”失败,退出状态为 1
如何在我的 mac 中安装 lxml 而无需安装 xcode?p>
最佳答案
您不必安装 XCode,只需安装 XCode 工具即可。这些指南应该可以帮助您进行配置:
- Configuring macOS Sierra 10.12 (请参阅编译器部分)
- Python Development Environment on macOS Sierra and El Capitan
摘自第一篇文章:
Installing development-related software in the past has required the compiler tool-chain that comes with Xcode. Thankfully, if you don’t need or want Xcode, those compiler tools are now available separately, saving download time and many gigabytes of disk space.
关于python - MacOS X 上的 pip install lxml 给出错误 : command 'cc' failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44067984/