How can I solve Segmentation fault (core dumped) ?

5,956 views
Skip to first unread message

Jason Kim

unread,
Aug 8, 2016, 12:42:24 AM8/8/16
to gensim
Hi,
I successfully installed gensim by 'pip install --upgrade gensim'.
But I've got segmentation fault when import module.
Some information is below.

root@digits-01:~# uname -v
#26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015
root@digits-01:~# 
root@digits-01:~# python
Python 2.7.12 |Anaconda 4.1.1 (64-bit)| (default, Jul  2 2016, 17:42:40) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
>>> import numpy
>>> numpy.__version__
'1.11.1'
>>> import scipy
>>> scipy.__version__
'0.18.0'
>>> from gensim import utils
Segmentation fault (core dumped)
root@digits-01:~#

Gordon Mohr

unread,
Aug 8, 2016, 6:38:21 PM8/8/16
to gensim
That's atypical – indicating a memory access violation of the type that shouldn't happen in pure python, and definitely not on a mere import. 

So there's not enough info to know what's uniquely wrong in your setup, and the best approach would be to try to ensure your setup is as much like more typical setups as possible. I'd suggest:

- uninstall all (or start fresh where nothing was installed)
- install the minimum necessary (I prefer miniconda to anaconda for this reason)
- use a conda environment as a regular user– rather than installing things globally or working as root

If there's still a problem, starting python with `-v` may provide more information about what was happening just before the segmentation fault. 

- Gordon

Jason Kim

unread,
Aug 8, 2016, 9:23:27 PM8/8/16
to gensim
Hi, Gordon

I've tried as you recommend.
It's perfectly work. Thank you so much.
Below is job history.

>> rm -rf /root/anaconda2
>> cd ./download
>> conda create -n mskim python=2.7
>> source activate mskim
>> conda install -n mskim gensim
>> python -c "import gensim"


2016년 8월 9일 화요일 오전 7시 38분 21초 UTC+9, Gordon Mohr 님의 말:

Melvyn Drag

unread,
Aug 29, 2016, 2:03:23 PM8/29/16
to gensim
I have the same issue. I had anaconda in my /opt so that it was available to all users and had this issue. 
I am only able to get this work when anaconda is installed for a user as you suggested.
 This is undesirable for the cluster where all users are depending on this python install.
Im staying on the look out and experimenting to try and resolve this issue
Reply all
Reply to author
Forward
0 new messages