【发布时间】:2014-07-21 09:35:06
【问题描述】:
我正在尝试让 python 在 Eclipse 中与我一起工作。我确实下载了 Pydev 并写了一个小 Python 代码。
我的python版本是:Python 2.7.6 在我的 Mac OS X 10.9.2 上
我现在收到的错误是(顺便说一句,我在使用 Jython 2.5.4rc1 和 Python 解释器时遇到了这个错误):
Traceback (most recent call last):
File "/Users/ha/EclipseProjects/PythonNLTK/Code.py", line 11, in <module>
import nltk
File "/Library/Python/2.7/site-packages/nltk/__init__.py", line 99, in <module>
from collocations import *
File "/Library/Python/2.7/site-packages/nltk/collocations.py", line 38, in <module>
from nltk.metrics import ContingencyMeasures, BigramAssocMeasures, TrigramAssocMeasures
File "/Library/Python/2.7/site-packages/nltk/metrics/__init__.py", line 23, in <module>
from nltk.metrics.segmentation import windowdiff, ghd, pk
File "/Library/Python/2.7/site-packages/nltk/metrics/segmentation.py", line 45, in <module>
import numpy
File "/Library/Python/2.7/site-packages/nltk/metrics/segmentation.py", line 45, in <module>
import numpy
File "/Library/Python/2.7/site-packages/numpy/__init__.py", line 107
SyntaxError: future feature print_function is not defined
我该如何解决?
【问题讨论】:
标签: python eclipse python-2.7 python-3.x jython-2.5