I have removed MacPorts from my Mac (10.7.5) and now Python seems to be broken. I am trying to run scrapy and I get the following error at the end:
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
When I run python and try to import that library, I get the same error as following:
$ 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
How can I clean up this mess now?
lxml(an add-on library) is b0rken. - Martijn Pieterslibxml2andlibxslt2(although I may be wrong—then again, even if I am, I doubt you'd want to explicitly require version 2.7.3 today…) - abarnert/usr/bin/python)? 2. You have no non-Apple-supplied Python installations. 3. There's something at/usr/lib/libxml2.dylib. 4. If you runxml2-config --versionit reports something 2.7.0 or later. Then: How did you installlxml? (pip,easy_install, download the tarball/extract/python setup.py install, or some other way)? - abarnertlxml. But given that I struggled to installgccon OS X 10.6.8 without Xcode and then struggled to makelxmlcompile, I am not surprised that it is still not working... - Sergey Orshanskiy