I had a working installation of NLTK (py26-nltk) on my Mac (OS X 10.6.2). Then I installed numpy. Now when I try to import nltk, I get this:
>>> import nltk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "nltk/__init__.py", line 83, in <module>
from collocations import *
File "nltk/collocations.py", line 39, in <module>
from nltk.metrics import ContingencyMeasures, BigramAssocMeasures, TrigramAssocMeasures
File "nltk/metrics/__init__.py", line 14, in <module>
from scores import *
File "nltk/metrics/scores.py", line 15, in <module>
from scipy.stats.stats import betai
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/stats/__init__.py", line 7, in <module>
from stats import *
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/stats/stats.py", line 203, in <module>
from morestats import find_repeats #is only reference to scipy.stats
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/stats/morestats.py", line 7, in <module>
import distributions
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/stats/distributions.py", line 27, in <module>
import vonmises_cython
File "numpy.pxd", line 30, in scipy.stats.vonmises_cython (scipy/stats/vonmises_cython.c:2939)
ValueError: numpy.dtype does not appear to be the correct type object
What has gone wrong? How can I fix this?