Reputation: 471
I am getting a segmentation fault while trying to import nltk on a debian machine.
Here's the python verbose output :-
>>> import nltk
....
....
import scipy.linalg.blas # precompiled from /usr/local/lib/python2.7/dist-packages/scipy/linalg/blas.pyc
# trying /usr/local/lib/python2.7/dist-packages/scipy/linalg/_fblas.so
dlopen("/usr/local/lib/python2.7/dist-packages/scipy/linalg/_fblas.so", 2);
Segmentation fault
Any suggestions ? I have tried uninstalling and reinstalling scipy followed by nltk.
thanks, Amit
Upvotes: 1
Views: 950
Reputation: 705
I had the same problem. I uninstalled scipy and nltk, then reinstalled nltk only.
pip uninstall scipy
pip uninstall nltk
pip install --no-cache-dir nltk
python
import nltk
nltk.download()
works.
However, the problem came back when I reinstalled scipy...
The solution for me was to uninstall both packages using pip and conda (conda uninstall nltk), then reinstall scipy using conda and nltk using pip. This combination worked for me, I'm not exactly sure why buit the reason was probably a faulty prior installation of nltk in anaconda.
Upvotes: 2