'/System/Library/Frameworks/amework/Versions/2.7/Extras/lib/python/PyObjC',Īfter installing pip with easy_install and then installing setuptools with pip install -user -upgrade setuptools: '/Users/glyph/Library/Python/2.7/lib/python/site-packages', '/System/Library/Frameworks/amework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/amework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/amework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/amework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/amework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/amework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/amework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/amework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/amework/Versions/2.7/lib/python27.zip', I can't seem to just call pkg_resources.require("a sensible version of setuptools") I have to set _requires_ to the sensible version of setuptools in _main_ before even importing pkg_resources. Pkg_resources has some affordance for dealing with multiple versions of software installed on a system, of course, but it doesn't seem to be exposed in an obvious way. I think maybe this is just the way things should be, because interoperating with the older version of setuptools doesn't seem to cause anything but heartache. However, now it hard depends on the new version of setuptools. If I add install_requires= to pip's setup.py, and then install it, then this problem goes away. This is a problem if a user does not have privileged access to a system but wants to do some Python development there or, if they do have privileged access to a system but take the wise precaution of not automatically using sudo when a person from the internet tells them to. Unfortunately through some combination of sys.path-management shenanigans, this older version of setuptools tends to take precedence when importing, even if a user has explicitly done pip install -user -upgrade setuptools. Mac OS X comes with an old version of setuptools pre-installed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |