如何查找python安装包的路径site-packages?
使用命令:
- python -m site(其中python为使用版本命令)
[test@m_011 ~]$ python3 -m site
sys.path = [
'/home/test',
'/usr/local/python3/lib/python36.zip',
'/usr/local/python3/lib/python3.6',
'/usr/local/python3/lib/python3.6/lib-dynload',
'/home/test/.local/lib/python3.6/site-packages',
'/usr/local/python3/lib/python3.6/site-packages',
]
USER_BASE: '/home/test/.local' (exists)
USER_SITE: '/home/test/.local/lib/python3.6/site-packages' (exists)
ENABLE_USER_SITE: True
- python -m site --user-site (其中python为使用版本命令)
[wodedev@wode011 ~]$ python3 -m site --user-site
/home/test/.local/lib/python3.6/site-packages