我格式化了我的电脑以查找站点包,但使用这些必要的行我看不到它们。
import sys
print ('\n'.join(sys.path))
我没有找到路径(我想看看那些路径):
'/usr/local/lib/python2.7/site-packages'
和
'/usr/local/lib/python3.5/site-packages'
输出是:
redhwan@redhwan:~$ python
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print ('\n'.join(sys.path))
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages