Clone wiki

compatibility / nltk


UPDATE: nltk should now be compilable & installable under 1.6.1 out-of-the-box: Could anyone test it please?

NLTK tested to be compatible with PyPy 1.8:

Category:Scientific libraries
Compatible:Compatible More Information
Soft Dependencies
PyYAMLCompatible More Information
NumpyIncompatible More Information

Older details (perhaps out-of-the-date)

NLTK can't be built by PyPy 1.6.1-rc due to See the exact error output below. However, according to :

 But if you just change line 282 in .../nltk/ into: 
    class SourcedString(object): 

and then it builds OK.

/tmp/nltk-2.0.1rc1$ pypy build
Traceback (most recent call last):
  File "", line 51, in run_toplevel
  File "", line 13, in <module>
    import nltk
  File "/tmp/nltk-2.0.1rc1/nltk/", line 113, in <module>
    import inference; from inference import *
  File "/tmp/nltk-2.0.1rc1/nltk/inference/", line 19, in <module>
    from discourse import *
  File "/tmp/nltk-2.0.1rc1/nltk/inference/", line 21, in <module>
    from nltk.sem.glue import DrtGlue
  File "/tmp/nltk-2.0.1rc1/nltk/sem/", line 15, in <module>
    from nltk.corpus import brown
  File "/tmp/nltk-2.0.1rc1/nltk/corpus/", line 77, in <module>
    from reader import *
  File "/tmp/nltk-2.0.1rc1/nltk/corpus/reader/", line 64, in <module>
    from nltk.corpus.reader.plaintext import *
  File "/tmp/nltk-2.0.1rc1/nltk/corpus/reader/", line 19, in <module>
    from util import *
  File "/tmp/nltk-2.0.1rc1/nltk/corpus/reader/", line 26, in <module>
    from nltk.sourcedstring import SourcedStringStream
  File "/tmp/nltk-2.0.1rc1/nltk/", line 282, in <module>
    class SourcedString(basestring):
TypeError: type 'basestring' is not an acceptable base class