即使我在不​​同的目录中也无法导入Numpy

时间:2015-05-20 03:27:52

标签: python numpy nltk

我一直在努力解决这个错误。

>>> tagged_word = nltk.pos_tag(tokenize);
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\nltk\tag\__init__.py", line 103, in pos_ta
g
    tagger = load(_POS_TAGGER)
  File "C:\Python27\lib\site-packages\nltk\data.py", line 786, in load
    resource_val = pickle.load(opened_resource)
  File "C:\Python27\numpy\__init__.py", line 160, in <module>
    raise ImportError(msg)
ImportError: Error importing numpy: you should not try to import numpy from
        its source directory; please exit the numpy source tree, and relaunch
        your python interpreter from there.

我在网上搜索并遵循建议确保我的工作目录与numpy的目录不同。我仍然收到这个错误。有没有人有替代解决方案。

1 个答案:

答案 0 :(得分:0)

我怀疑你已经在nltk

的同一目录中安装了numpy