gpt4 book ai didi

python - 导入已安装的模块时为 "ImportError: DLL load failed: The specified module could not be found"

转载 作者:行者123 更新时间:2023-11-28 19:30:08 24 4
gpt4 key购买 nike

我使用的是 Window 10.1 和 Python 3.4。我使用 wheel 文件(URL:http://www.lfd.uci.edu/~gohlke/pythonlibs/)安装了 nltk、numpy、scipy 和 gensim 模块。

这是已安装模块的屏幕截图:

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.

我该如何解决这个问题?

最佳答案

您应该按照 http://www.nltk.org/install.html 上的建议使用 pip 安装 NLTK或者试试 conda https://anaconda.org/anaconda/nltk .这应该会自动安装 NLTK 的依赖项。

请参阅https://gist.github.com/alvations/0ed8641d7d2e1941b9f9获取 NLTK 在 Windows 上的详细安装指南。

关于python - 导入已安装的模块时为 "ImportError: DLL load failed: The specified module could not be found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36371591/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com