python/nltk problem

Frank Schima macsforever2000 at macports.org
Mon Mar 8 09:42:29 PST 2010


Hi Victor,


it works fine here. Try rebuilding it:

sudo port uninstall py26-nltk
sudo port install py26-nltk

Also what is the output of the following for you?

port installed py26-numpy py26-scipy python26


Cheers!
Frank

On Mar 8, 2010, at 9:10 AM, Victor Eijkhout wrote:

> This worked before I did "upgrade outdated" a couple of days ago.
> 
> %% python
> Python 2.6.4 (r264:75706, Nov 14 2009, 07:09:21)
> [GCC 4.0.1 (Apple Inc. build 5490)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import nltk
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nltk/__init__.py", line 83, in <module>
>    from collocations import *
>  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nltk/collocations.py", line 38, in <module>
>    from nltk.metrics import ContingencyMeasures, BigramAssocMeasures, TrigramAssocMeasures
>  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nltk/metrics/__init__.py", line 14, in <module>
>    from scores import *
>  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nltk/metrics/scores.py", line 15, in <module>
>    from scipy.stats.stats import betai
>  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/stats/__init__.py", line 7, in <module>
>    from stats import *
>  File "/opt/local/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 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/stats/morestats.py", line 7, in <module>
>    import distributions
>  File "/opt/local/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
> >>>
> 
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users



More information about the macports-users mailing list