Python Sklearn在eclipse IDE中不再工作



我更新了Sklearn包:

sudo pip install -U numpy scipy scikit-learn

在macosx 10.8(山狮)中,一切都很好。我通过终端(命令行)对它进行了测试,它工作正常。但是这个包在我的IDE eclipse(juno)中停止了工作。我得到错误:

Traceback (most recent call last):
  File "/Users/marceloschiessl/RDF_text_project/tese/testDevelop.py", line 9, in <module>
    import datetime, nltk
  File "/Library/Python/2.7/site-packages/nltk/__init__.py", line 103, in <module>
    from nltk.collocations import *
  File "/Library/Python/2.7/site-packages/nltk/collocations.py", line 39, in <module>
    from nltk.metrics import ContingencyMeasures, BigramAssocMeasures, TrigramAssocMeasures
  File "/Library/Python/2.7/site-packages/nltk/metrics/__init__.py", line 16, in <module>
    from nltk.metrics.scores import          (accuracy, precision, recall, f_measure,
  File "/Library/Python/2.7/site-packages/nltk/metrics/scores.py", line 16, in <module>
    from scipy.stats.stats import betai
  File "/Library/Python/2.7/site-packages/scipy/stats/__init__.py", line 334, in <module>
    from .stats import *
  File "/Library/Python/2.7/site-packages/scipy/stats/stats.py", line 181, in <module>
    import scipy.special as special
  File "/Library/Python/2.7/site-packages/scipy/special/__init__.py", line 546, in <module>
    from ._ufuncs import *
  File "numpy.pxd", line 155, in init scipy.special._ufuncs (scipy/special/_ufuncs.c:21818)
ValueError: numpy.dtype has the wrong size, try recompiling

有什么帮助吗?

我使用PyDev,所以我向您报告与此插件相关的"良好实践"。强烈建议您每次更新python包时都更新"python解释器"PYTHONPATH。要执行此操作,请转到:

Windows->首选项->PyDev->解释器->Python解释器

在该位置,您可以使用"快速自动配置"按钮或手动查看并更正PYTHONPATH。

HTH

相关内容

  • 没有找到相关文章

最新更新