NLTK ImportError:DLL加载失败:找不到指定的模块

特劳

我正在研究pycharm中的一个项目。我试图像这样将nltk导入到我的项目中。我尝试通过许多不同的方式来安装它,它们都导致相同的结果。错误最后显示。

我尝试通过pycharm上的灯泡安装它,尝试通过项目设置安装模块,尝试通过conda -install nltk安装nltk。我不明白为什么会收到此错误。有人可以阐明一下吗?先感谢您!

import nltk    
nltk.download()

C:\Users\Orestis\PycharmProjects\LimeExamples\venv\Scripts\python.exe  
C:/Users/Orestis/PycharmProjects/LimeExamples/hate_tweets.py
Traceback (most recent call last):
  File "C:/Users/Orestis/PycharmProjects/LimeExamples/hate_tweets.py", line 1, in <module>
    import nltk
  File "C:\Users\Orestis\PycharmProjects\LimeExamples\venv\lib\site-packages\nltk\__init__.py", line 152, in <module>
    from nltk.stem import *
  File "C:\Users\Orestis\PycharmProjects\LimeExamples\venv\lib\site-packages\nltk\stem\__init__.py", line 29, in <module>
    from nltk.stem.snowball import SnowballStemmer
  File "C:\Users\Orestis\PycharmProjects\LimeExamples\venv\lib\site-packages\nltk\stem\snowball.py", line 32, in <module>
    from nltk.corpus import stopwords
  File "C:\Users\Orestis\PycharmProjects\LimeExamples\venv\lib\site-packages\nltk\corpus\__init__.py", line 66, in <module>
    from nltk.corpus.reader import *
  File "C:\Users\Orestis\PycharmProjects\LimeExamples\venv\lib\site-packages\nltk\corpus\reader\__init__.py", line 105, in <module>
    from nltk.corpus.reader.panlex_lite import *
  File "C:\Users\Orestis\PycharmProjects\LimeExamples\venv\lib\site-packages\nltk\corpus\reader\panlex_lite.py", line 15, in <module>
    import sqlite3
  File "C:\Users\Orestis\Anaconda3\lib\sqlite3\__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "C:\Users\Orestis\Anaconda3\lib\sqlite3\dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ImportError: DLL load failed: The specified module could not be found.
特劳

对于将来遇到同样问题的任何人,只要遵循Pavel Karateev的建议,我都可以解决。我创建了一个普通的conda环境,并通过anaconda提示安装了所有软件包,方法是在创建的conda虚拟环境中使用conda -install nltk。

据我了解,问题是我使用PyCharm UI以anaconda作为基础创建了一个虚拟视频,这是一个很大的错误!

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

ImportError:DLL加载失败:找不到numpy的指定模块

pyodbc ImportError:DLL加载失败:找不到指定的模块

Python:ImportError:DLL加载失败:找不到指定的模块

ImportError:DLL加载失败:找不到指定的模块

ImportError:DLL加载失败:找不到指定的模块

Scipy ImportError:DLL加载失败:找不到指定的模块

skimage-ImportError:DLL加载失败:找不到指定的模块

ImportError:DLL加载失败:找不到指定的模块(sklearn)

ktrain ImportError:DLL加载失败:找不到指定的模块

MeCab:“ ImportError:DLL加载失败:找不到指定的模块。”

如何绕过kivy模块错误:ImportError:DLL加载失败:找不到指定的模块?

尝试导入sklearn模块时出错:ImportError:DLL加载失败:找不到指定的模块

cx_Freeze ImportError:导入_ctypes时,DLL加载失败失败:找不到指定的模块

ImportError:DLL加载失败:找不到指定的模块。Tensorflow聊天机器人

从scipy.linalg导入_fblas:ImportError:DLL加载失败:找不到指定的模块

发生异常:导入pdftotext时,ImportError DLL加载失败:找不到指定的模块

ImportError:导入_psycopg时DLL加载失败:找不到指定的模块

无法打开 ANACONDA 或 SPYDER:ImportError:DLL 加载失败:找不到指定的模块

ver.2 PyGreSQL错误:来自_pg import * ImportError:DLL加载失败:找不到指定的模块

ImportError:导入pyexpat时DLL加载失败:找不到指定的模块

Windows上的Tensorflow-ImportError:DLL加载失败:找不到指定的模块

Tensorflow-alpha-gpu问题ImportError:DLL加载失败:找不到指定的模块

在AWS Lambda中找不到NLTK模块

Tensorflow:ImportError:DLL加载失败:找不到模块

ImportError:DLL加载失败:找不到指定的过程。(进口sklearn)

Pyinstaller:导入错误:DLL加载失败:找不到指定的模块

PyQt5:DLL加载失败:找不到指定的模块

Pyinstaller 导入错误:DLL 加载失败:找不到指定的模块

DLL加载失败:导入scipy时找不到指定的模块