Location of global libraries for Python on Mac?

混江龙づ霸主 提交于 2019-11-28 05:27:51
diatoid

Try checking your python's sys.path list with:

import sys
print(sys.path)

A simple method I use is to ask a module where it is:

import os
print(os.__file__)

/Library/Python/2.6/site-packages/ is indeed the right place (assuming it's Mac OS 10.6 "Snow Leopard" - you didn't mention which).

As @diatoid mentioned, check your system path (and make sure you're actually using Python 2.6 by running python -V).

For Python 3.5, It's /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!