如何找到Python的site-packages路径 发表于 2016-05-18 | | 阅读次数 | 1234In [22]: import sysIn [23]: print sys.path['', '/usr/local/bin', '/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg', '/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg', '/Library/Python/2.7/site-packages/psutil-2.0.0-py2.7-macosx-10.11-intel.egg', '/Library/Python/2.7/site-packages/pinax_blog-4.3.0-py2.7.egg', '/Library/Python/2.7/site-packages/Pygments-2.1-py2.7.egg', '/Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.11-intel.egg', '/Library/Python/2.7/site-packages/Scrapy-1.0.4-py2.7.egg', '/Library/Python/2.7/site-packages/service_identity-14.0.0-py2.7.egg', '/Users/wangqi/Documents/workspace/tests/zhihu/src/pyv8', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages', '/Library/Python/2.7/site-packages/PIL', '/Library/Python/2.7/site-packages/IPython/extensions', '/Users/wangqi/.ipython'] 添加微信,加我好友,与我直接交流! 坚持原创技术分享,您的支持将鼓励我继续创作! 赏 微信打赏 支付宝打赏