Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/279.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
python列表模块分段错误_Python_Python 2.7 - Fatal编程技术网

python列表模块分段错误

python列表模块分段错误,python,python-2.7,Python,Python 2.7,我想列出运行SL7.3(因此是python 2.7.5)的机器上安装的所有软件包。我尝试运行命令help(“模块”),但出现以下错误。有人能帮忙吗。多谢各位 Python 2.7.5 (default, Nov 3 2016, 22:05:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >

我想列出运行SL7.3(因此是python 2.7.5)的机器上安装的所有软件包。我尝试运行命令
help(“模块”)
,但出现以下错误。有人能帮忙吗。多谢各位

Python 2.7.5 (default, Nov  3 2016, 22:05:29)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help("modules")

Please wait a moment while I gather a list of all available modules...

dm.c: 1693: not running as root returning empty list
/usr/lib64/python2.7/site-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed
  import gobject._gobject
/usr/lib64/python2.7/site-packages/matplotlib/cbook.py:136: MatplotlibDeprecationWarning: The matplotlib.delaunay module was deprecated in version 1.4. Use matplotlib.tri.Triangulation instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)
/usr/lib64/python2.7/pkgutil.py:110: FutureWarning: The pandas.rpy module is deprecated and will be removed in a future version. We refer to external packages like rpy2.
See here for a guide on how to port your code to rpy2: http://pandas.pydata.org/pandas-docs/stable/r_interface.html
  __import__(name)
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: specified class size for type 'PyGtkGenericCellRenderer' is smaller than the parent type's 'GtkCellRenderer' class size
  from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion 'node != NULL' failed
  from gtk import _gtk
Segmentation fault (core dumped)
这对你有帮助吗

或使用以下代码查看

import pip

for dist in pip.get_installed_distributions():
    print(dist)

您最好使用类似于
pip freeze
的工具,或者只查看
网站包中的内容。您正在使用的命令尝试加载所有模块,如果有冲突,它将崩溃。感谢pip freeze/list完成了任务。感谢pip freeze/list完成了任务。
import pip

for dist in pip.get_installed_distributions():
    print(dist)