在mac下查找python包存放路径site-packages的实现方法

Serepta ·
更新时间:2024-11-13
· 784 次阅读

想查找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的实现方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持软件开发网。

您可能感兴趣的文章:在Mac下使用python实现简单的目录树展示方法mac PyCharm添加Python解释器及添加package路径的方法在Mac上删除自己安装的Python方法MacBook下python3.7安装教程mac下如何将python2.7改为python3mac下pycharm设置python版本的图文教程教你用 Python 实现微信跳一跳(Mac+iOS版)mac系统安装Python3初体验MAC中PyCharm设置python3解释器基于Python在MacOS上安装robotframework-ride



方法 packages mac Python

需要 登录 后方可回复, 如果你还没有账号请 注册新账号