我使用的是Window 10.1,python3.4。我使用wheel文件安装了nltk,numpy,scipy和gensim(url:http://www.lfd.uci.edu/~gohlke/pythonlibs/)
Screenshot of installed modules
我正在运行此声明
from gensim import corpora, models, similarities
我收到此导入错误:
Traceback (most recent call last):
File "C:\Python34\sample.py", line 1, in <module>
from gensim import corpora, models, similarities
File "C:\Python34\lib\site-packages\gensim\__init__.py", line 6, in <module>
from gensim import parsing, matutils, interfaces, corpora, models, similarities, summarization
File "C:\Python34\lib\site-packages\gensim\matutils.py", line 21, in <module>
import scipy.linalg
File "C:\Python34\lib\site-packages\scipy\linalg\__init__.py", line 174, in <module>
from .misc import *
File "C:\Python34\lib\site-packages\scipy\linalg\misc.py", line 5, in <module>
from .blas import get_blas_funcs
File "C:\Python34\lib\site-packages\scipy\linalg\blas.py", line 155, in <module>
from scipy.linalg import _fblas
ImportError: DLL load failed: The specified module could not be found.
请帮助,我真的需要这个。
答案 0 :(得分:-1)
您应该按照http://www.nltk.org/install.html的建议使用pip
安装NLTK,或者尝试conda
https://anaconda.org/anaconda/nltk。这应该会自动安装NLTK的依赖项。
有关Windows上NLTK的详细安装指南,请参阅https://gist.github.com/alvations/0ed8641d7d2e1941b9f9。