在mac下查找python包存放路径site-packages的实现方法
程序员文章站
2023-09-07 22:35:37
想查找mac下python的site-packages目录,如果用网上搜的安装目录之类的去找,进去每一层很多都是软链接形式存在,比较浪费时间;
比较快捷的方法如下:...
想查找mac下python的site-packages目录,如果用网上搜的安装目录之类的去找,进去每一层很多都是软链接形式存在,比较浪费时间;
比较快捷的方法如下:
macbook-pro-6:scrapy-1.5.0 haizhi$ python python 2.7.10 (default, jul 30 2016, 18:31:42) [gcc 4.2.1 compatible apple llvm 8.0.0 (clang-800.0.34)] on darwin type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> print(sys.path) ['', '/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/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', '/library/python/2.7/site-packages', '/system/library/frameworks/python.framework/versions/2.7/extras/lib/python', '/system/library/frameworks/python.framework/versions/2.7/extras/lib/python/pyobjc', '/library/python/2.7/site-packages/scrapy-1.5.0-py2.7.egg'] >>>
以上这篇在mac下查找python包存放路径site-packages的实现方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。