关于Python我有个问题。在
当我打印系统路径系统版本显示在Macports版本之前。如何更改路径以使macports版本永久性地出现在系统版本之前,我不想在每个程序的开头反转路径。如果您感兴趣,这是整个路径:['', '/Library/Python/2.7/site-packages/pyglet-1.1.4-py2.7.egg', '/Library/Python/2.7/site-packages/greenlet-0.3.1-py2.7-macosx-10.7-intel.egg', '/Library/Python/2.7/site-packages/cocos2d-0.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/simplejson-2.1.6-py2.7-macosx-10.7-intel.egg', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyObjC', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info', '/Library/Python/2.7/site-packages']