Installing numpy broke NLTK (OS X 10.6.2, Python 2.6) -
I had a working installation of NLTK (PI-26-NLTK) on Mac (OS X 10.6.2). Then I installed numpy. Now when I try to import nltk, I get this:
gt; & Gt; Import nltk traceback (most recent call final): File "& lt; stdin>", line 1, & lt; Module & gt; The file "nltk / __init__.py", line 83, & lt; Module & gt; Import from Collocations * File "nltk / collocations.py", line 39, & lt; Module & gt; Nlt From Metrics Import, Attached Musers, Bigram ASSOC, Méisers, Trigram Essos Méisers file "nltk / metrics / __ init__.py", line 14, & lt; Module & gt; Score import * file from "nltk / metric / score", line 15, & lt; Module & gt; Bitai file from Scipy.stats.stats "/ Library / Framworks / Python. Framework / version-2.6 / Leib / Python 2 / site-package / SC / seat /__INIT__.py", in line 7, in & lt; Module & gt; Import from statistics * File "/ Library / Framworks / Python. Framework / Version-2.6 / Lib / Python 2/6 / Site-Package / SC / Stats / Stats", Line 203, & lt; Module & gt; The only reference to the find_repeats #scipy.stats file from Morestats import is "/ library / framework / Python.framework / version-2.6 / lib / python2.6 / site-packages / scipy / stats / morestats.py", in line 7, LT; Module & gt; Import distribution file "/ Library / Framework / Python. Framework / Version-2.6 / LIB / Python 2 / Site-package / SC / ESTAT / Distribution", in line 27, & lt; Module & gt; Import vonmises_cython file "numpy.pxd", line 30, scipy.stats.vonmises_cython (sipi / statistics / vonmises_cython.c: 2939) ValueError: numpy.dtype does not appear to be the correct type of object
What's wrong? How can I fix this? It seems that [version] SciPy and NumPy compared to between NLTK and Nompi Incompatibilities between versions Your hypothesis: Hype # 1 Hype # 2 (less likely)
While SciPy is not required for NPL, it is an optional import, and will be loaded if available.
Comments
Post a Comment