mac
多版本 python
查找 site-packages
mac
自带 2.7
但是很多都是 python3
开发的
在安装 python3
找不到 site-packages
直接在终端输入
1 2 3 4 5 6 7
| python3
import sys
print(sys.path)
['', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages']
|
最后的这个就是 site-packages
路径
1
| '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages'
|