当我尝试import regex
.
Traceback (most recent call last):
File "app.py", line 3, in <module>
import regex
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/regex.py", line 391, in <module>
import _regex_core
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/_regex_core.py", line 21, in <module>
import _regex
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/_regex.so, 2): no suitable image found. Did find:
/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/_regex.so: mach-o, but wrong architecture
我已经通过 macports 安装了 python33,然后通过 sudo python setup.py install 安装了最新版本的正则表达式(由 Matthew Barnett 编写)。
我正在使用 Mac Os X Leopard (8.5)。我的处理器是 64 位的 Core 2 Duo。我该如何解决这个错误?
当我跑步时,lipo -info
我得到:
Non-fat file: /opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/_regex.so is architecture: i386
当我运行lipo -info /opt/local/bin/python
非胖文件时:/opt/local/bin/python 是架构:ppc7400
为什么是python ppc7400?