2012-07-10 77 views
0

,當我嘗試運行python->幫助() - >模塊,我得到這個:的Python模塊段錯誤

% python 
Python 2.7.1 (r271:86832, Apr 13 2012, 11:08:33) [C] on sunos5 

>>> help() 

help> modules 

Please wait a moment while I gather a list of all available modules... 
file ghash.c: line 875: assertion `hash_table->ref_count > 0' failedfile ghash.c: line 875: assertion `hash_table->ref_count > 0' failed 
Segmentation Fault 

就這樣,倒不言而喻。我的問題是爲什麼?以及我如何解決它?

我可以在代碼中正常訪問模塊,但無法從幫助菜單中調出列表。來自幫助的其他標籤也可以正常工作。它只是這一個打破

+0

有趣。我無法重現這一點。 – mgilson 2012-07-10 19:10:57

+0

@mgilson:它是* a *擴展模塊,但可能不是stdlib中的一個。 – 2012-07-10 19:14:26

回答

2

運行python -vv並重復您的步驟。查看哪個模塊無法導入。

或安裝faulthandler。啓用它並重復你的步驟。

+0

我不知道,沒有失敗的進口。一切都很順利。無法安裝faulthadler,而不是管理員在工作 – Squid1361 2012-07-10 19:36:04

+0

@ Squid1361:你不需要是管理員。在'〜/ .local'(--user選項)中安裝或使用virtualenv。用'python -vv'在segfault之前的最後幾行是什麼? – jfs 2012-07-10 20:24:42

+0

我會試着安裝它。 – Squid1361 2012-07-10 20:28:38