Mac(10.7.5)からMacPortsを削除しましたが、Pythonが壊れているようです。Scrapyを実行しようとすると、最後に次のエラーが発生します。
ImportError: dlopen(/Library/Python/2.7/site-packages/lxml-2.3.4-py2.7-macosx-10.7-intel.egg/lxml/etree.so, 2): Symbol not found: _exsltDateXpathCtxtRegister
Referenced from: /Library/Python/2.7/site-packages/lxml-2.3.4-py2.7-macosx-10.7-intel.egg/lxml/etree.so
Expected in: /usr/lib/libexslt.0.dylib
in /Library/Python/2.7/site-packages/lxml-2.3.4-py2.7-macosx-10.7-intel.egg/lxml/etree.so
Pythonを実行してそのライブラリをインポートしようとすると、次と同じエラーが発生します。
$ python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 14:13:39)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from lxml import etree
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Library/Python/2.7/site-packages/lxml-2.3.4-py2.7-macosx-10.7-intel.egg/lxml/etree.so, 2): Symbol not found: _xsltDocDefaultLoader
Referenced from: /Library/Python/2.7/site-packages/lxml-2.3.4-py2.7-macosx-10.7-intel.egg/lxml/etree.so
Expected in: flat namespace
in /Library/Python/2.7/site-packages/lxml-2.3.4-py2.7-macosx-10.7-intel.egg/lxml/etree.so
どうすればこの混乱を今すぐ片付けることができますか?