- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 easy_install (和 pip)安装 lxml 和 pycrypto 模块,但收到如下错误消息
Running lxml-2.3.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-kGsWMh/lxml-2.3.4/egg-dist-tmp-Gjqy3f
Building lxml version 2.3.4.
Building without Cython.
Using build configuration of libxslt 1.1.24
In file included from /usr/include/limits.h:63,
from /Developer/usr/bin/../lib/gcc/powerpc-apple-darwin10/4.0.1/include/limits.h:10,
from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:19,
from src/lxml/lxml.etree.c:4:
/usr/include/sys/cdefs.h:540:4: error: #error Unknown architecture
In file included from /usr/include/limits.h:64,
from /Developer/usr/bin/../lib/gcc/powerpc-apple-darwin10/4.0.1/include/limits.h:10,
from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:19,
from src/lxml/lxml.etree.c:4:
/usr/include/machine/limits.h:10:2: error: #error architecture not supported
In file included from /usr/include/sys/_types.h:33,
from /usr/include/_types.h:27,
from /usr/include/stdio.h:67,
from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:33,
from src/lxml/lxml.etree.c:4:
/usr/include/machine/_types.h:36:2: error: #error architecture not supported
In file included from /usr/include/_types.h:27,
from /usr/include/stdio.h:67,
from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:33,
from src/lxml/lxml.etree.c:4:
/usr/include/sys/_types.h:94: error: syntax error before ‘__darwin_blkcnt_t’
src/lxml/lxml.etree.c:165640: error: syntax error before ‘val’
src/lxml/lxml.etree.c:165645: error: syntax error before ‘val’
啦啦啦。 。 .
src/lxml/lxml.etree.c:165645: error: syntax error before ‘val’
lipo: can't figure out the architecture type of: /var/folders/f3/2q2x2p015kzgd4nbrn_qwykh0000gn/T//cc1pnrww.out
error: command 'gcc-4.0' failed with exit status 1
当我尝试安装 pycrypto 时,我也遇到了类似的语法错误。我试过this answer但徒劳。我尝试使用 setuptools-0.6c11-py2.6.egg 和 setuptools-0.6c11-py2.7.egg 设置 python 2.6 和 2.7 环境,但得到相同的输出。
我在网上搜索了很多,但找不到解决方案。
编辑:我在 macbook pro 2010 上使用 OSX 10.7,并且安装了 XCode 4 和 3
在尝试上面链接中的命令时,我将 args 替换为最新版本。
python setup.py build --static-deps --libxml2-version=2.7.8 --libxslt-version=1.1.26
sudo python setup.py install
我读过其他帖子并尝试过这个
STATIC_DEPS=true sudo easy_install --allow-hosts=lxml.de,*.python.org lxml
解决方案:
正如@jdi建议的那样,我做了以下事情
$ brew install --use-llvm libxml2
$ brew install --use-llvm libxslt
从link安装了gcc ,因为我仍然面临建议的选项 1 和 2 的问题
然后,要么这个
$ export ARCHFLAGS="-arch i386 -arch x86_64"
$ /usr/bin/python2.6 setup.py build
$ sudo /usr/bin/python2.6 setup.py install
或者这个,会起作用
$ sudo env ARCHFLAGS="-arch i386 -arch x86_64" easy_install-2.6 lxml
同样适用于 pycrypto
最佳答案
这表明您构建的方式不正确:/Developer/usr/bin/../lib/gcc/powerpc-apple-darwin10
,除非您使用的是旧的 powerpc 机器。
检查您正在运行的 OSX 版本以及用于构建 lxml 的命令。您可能需要在构建之前在 shell 中设置 export ARCHFLAGS="-arch i386 -arch x86_64"
,以避免使用 ppc
进行构建。不知道为什么你会得到一个旧的拱门。
此外,请确保您安装了最新的 Xcode。而且,如果您逐字跟踪您发布的链接,请确保您使用的是这些软件包的最新版本,而不是字面版本,因为该链接已有 3 年历史了。
如果一切都失败,请安装 homebrew并通过该包管理器安装它。
更新: XCode 4.2+ 更新后缺少 GCC 4.2 的选项
选一个
使用这个简单的指南安装 gcc 4.2:
http://caiustheory.com/install-gcc-421-apple-build-56663-with-xcode-42
使用自制程序安装它:
酿造水龙头自制/欺骗
brew 安装 homebrew/dupes/apple-gcc42
完全忽略 gcc 并使用 llvm 和brew
brew install --use-llvm libxml2
关于python - 无法在 mac 上使用 easy_install 或 pip 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10658909/
更新到 Xcode 12.2 后,由于与 Apple Silicon 相关的链接错误,我的项目开始无法编译。我似乎已经修复了大部分问题,但是一个构建静态链接框架的子项目给我带来了问题。然而,具有明显相
我有一台旧的 MacBook Pro,我在其中制作了两个应用程序并提交到应用程序商店。所以基本上签名身份在该机器的钥匙串(keychain)中。在 Mavericks 升级后,我不得不从那台计算机转移
我正在 MAC OSX 10.6 上编写一个示例应用程序,其 gcc 版本为 4.2。我正在使用 gcc 4.2 版编译应用程序。它在同一台机器上工作正常,但在 MAC OSX 10.5 (gcc 4
这是我的简单 mac 地址生成器: private String randomMACAddress(){ Random rand = new Random(); byte[] macA
我一直在寻找一种将十进制 MAC 地址转换为十六进制地址的方法。 例如 170.187.204.0.17.34至AA:BB:CC:00:11:22 . 致Convert HEX to Decimal
我想使用 UISceneSession 的委托(delegate)方法当用户将注意力从应用程序(窗口)移开,然后又回到应用程序(窗口)时,生命周期有助于通知我的 Mac Catalyst 应用程序。
我在签署 Mac 应用程序安装程序时遇到问题,我计划在 Mac 应用商店之外分发该应用程序。我正在使用开发人员安装程序证书来签署应用程序,但它给出了一些错误。下面是我用来签署应用程序的命令。 prod
Mac Catalyst 允许调整窗口大小,有没有办法为 Mac Catalyst 应用程序提供最小窗口大小? 最佳答案 只需将以下代码块添加到您的 application:didFinishLaun
这是一个非常理论性的问题,但对我来说很安静,即我如何进行下一步。 我正在开发一个SwiftUI MacOS应用程序,用户可以在其中上传自己的文件。元数据将存储在CoreData中,而我将文件手动存储在
滑动删除在 maccatalyst 中不起作用。相同的代码在 iPad 上运行良好。 在 maccatalyst 中未调用 UITableview trailingSwipeActionsConfig
我有两台 Mac,在进行 iPad 开发时,如果可以让另一台 Mac 启动模拟器并在构建完成后加载应用程序,我很感兴趣。 如果 iPad 应用程序在一台 Mac 屏幕和 Xcode 的模拟器中运行,所
我有一个用 objective-c 开发的 mac 应用程序。cpp 中还有另一个命令行中间应用程序,它是 native 主机应用程序,用于接收来自 chrome 扩展的消息。每当中间应用程序从扩展程
是否可以使用来自 Comodo 或 Thawte 的代码签名证书来签署应用程序并通过 Gatekeeper,或者我需要为此目的拥有 Mac 开发者订阅? 最佳答案 您必须是 Mac Developer
我正在使用 C++ 和 OpenGL/SDL 编写一个游戏,使用 Visual Studio 作为我的 IDE。我没有 Mac,甚至对这个平台都不熟悉。但我还是想发布给 Mac 用户。 我有三个问题。
我想将 MAC 地址 00163e2fbab7(存储为字符串)转换为其字符串表示形式 00:16:3e:2f:ba:b7。最简单的方法是什么? 最佳答案 使用一种完全迂回的方法来利用现有的一次将两个十
无法连接到Mac上的MySQL工作台。我收到以下错误:无法连接,服务器可能未运行。无法连接到‘127.0.0.1’上的MySQL服务器(61)如有帮助,将不胜感激。。谢谢!
我已经搜索了很长时间,似乎无法找到这个问题的答案。在 SO 上只找到两个问题/答案,但他们仍然没有回答这个问题 ( https://stackoverflow.com/search?q=netcore
我们在 Docker for Mac 中有一个 LoadBalancer 真是太酷了。 我对创建的端口有疑问: apiVersion: v1 kind: Service metadata: nam
我有一个我一直在从事的小型开源 OSX 项目,我想在 App Store 之外分发。 随着即将发布的 Mountain Lion,我想提供一个证书,以减少安装过程中的痛苦。 使用 App Store,
我的一台 Mac 没有互联网连接。我需要使用 docker pull。我的想法是,我将在我的一台具有互联网连接的 Mac 中使用 docker pull,然后将其复制到我没有互联网连接的 Mac。如何
我是一名优秀的程序员,十分优秀!