不确定这里发生了什么。令我感到奇怪的一件事是它看起来在python 3.5.2目录中,然后以某种方式最终查看python 2.6目录,然后引发异常。这在我本地运行时工作正常,但在我大学的远程计算系统上运行时会发生错误。请帮帮忙?
Traceback (most recent call last):
File "svm_bigram.py", line 15, in <module>
from feature_extractors import FeatureExtractor, UnigramFeatureExtractor
File "/home/ls4170/Desktop/ml2017project/code/util/feature_extractors.py", line 1, in <module>
from nltk import word_tokenize
File "/usr/local/pkg/python/3.5.2/lib/python3.5/site-packages/nltk/__init__.py", line 114, in <module>
from nltk.collocations import *
File "/usr/local/pkg/python/3.5.2/lib/python3.5/site-packages/nltk/collocations.py", line 39, in <module>
from nltk.metrics import ContingencyMeasures, BigramAssocMeasures, TrigramAssocMeasures
File "/usr/local/pkg/python/3.5.2/lib/python3.5/site-packages/nltk/metrics/__init__.py", line 16, in <module>
from nltk.metrics.scores import (accuracy, precision, recall, f_measure,
File "/usr/local/pkg/python/3.5.2/lib/python3.5/site-packages/nltk/metrics/scores.py", line 16, in <module>
from scipy.stats.stats import betai
File "/usr/lib64/python2.6/site-packages/scipy/__init__.py", line 13
raise ImportError,"Cannot import scipy when running from numpy source directory."
^
SyntaxError: invalid syntax