11/21/2023 0 Comments Macports python pipTheoretically it might be possible to just repoint the dependencies with install_name_tool, but that's more likely to fail miserably-or, if you're really unlucky, to seem to work but then crash when you really need it… Just re-building lxml should fix the problem. The problem here is that lxml was built against MacPorts libxml2/ libxslt2, instead of against your system versions. ImportError: dlopen(/Library/Python/2.7/site-packages/lxml-2.3./lxml/etree.so, 2): Symbol not found: _xsltDocDefaultLoaderĪssuming this is the system Python, and you installed lxml into it via pip, and the version of libxml2 that comes with 10.7.5 is good enough for you (I think they started shipping somewhat recent versions in 10.7-as in 2.7.x-but I can't remember for sure), it should be as simple as: sudo pip uninstall lxml Type "help", "copyright", "credits" or "license" for more information. When I run python and try to import that library, I get the same error as following: $ python In /Library/Python/2.7/site-packages/lxml-2.3./lxml/etree.so Referenced from: /Library/Python/2.7/site-packages/lxml-2.3./lxml/etree.so 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./lxml/etree.so, 2): Symbol not found: _exsltDateXpathCtxtRegister ![]() 'pip27' is now active.I have removed MacPorts from my Mac (10.7.5) and now Python seems to be broken. Update 2014-04: MacPorts now does provide a port select pip option so you should no longer need to do the PATH hack. profile to add the Python framework bin directory at the head of the paths: export PATH=/opt/local/Library/Frameworks/amework/Versions/Current/bin:/opt/local/bin. Update: Until MacPorts provides a port select pip option (as requested in the MacPorts issue linked above), you should be able to have pip execute the MacPorts version by modifying your. If so, by default, you would see them with /usr/bin/python2.7 and/or installed in /usr/local/bin and /Library/Python/2.7. Perhaps you installed versions of these to the system Python 2.7. Warning: Unable to get active selected version: The specified group 'pip' does not exist.Įrror: The 'list' command failed: The specified group 'pip' does not exist.īTW, neither pip nor ipython are supplied by Apple with OS X system Pythons, so it's not clear what you mean by bundled OS X defaults. ![]() In general, MacPorts installs Python scripts with version-specific suffixes, so independent of port select options, you should find those commands with their suffix, for example: $ port select -list ipython MacPorts does provide port select options for some of the commands you mention like python and ipython but does not yet for pip. Without more information, it's hard to guess what behavior you are seeing and what you expect to see. Does anyone know what's going on here?Įdit: I should clarify that I don't consider this a complete fix - you're supposed to be able to change back to the Apple version with a command like sudo port select -set python python25-apple, which I suspect I'll only get back by solving the underlying problem.įor the record, the contents of ~/.profile: export PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/texbin None (active) # shouldn't the bundled version be here?Ĭhanging the active port ( sudo port select -set python python27) solves the problem, but not all ports work with port select. I suspect the output of port select is a symptom: $ port select python profile to make sure that /opt/local/bin came first in the PATH, but that hasn't solved the problem. This has had the side-effect that many of the ports I was using have gone back to their bundled OS X defaults. For an easier life, I simply cleared out /opt/local/ and reinstalled the latest version of MacPorts, followed by the ports themselves. ![]() After upgrading to Mountain Lion, some of my MacPorts stopped working.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |