尝试在pycharm上安装spacy langdetect和langid但没有成功

问题描述 投票:0回答:1

由于某种原因,这些模块不存在于我的Pycharm插件中,而我做的是用于pip安装它们所以我不能在pycharm中使用my script(as in the picture u can see the interpeterthem

import spacy
from spacy_langdetect import LanguageDetector
nlp = spacy.load('he')
#language_detector = language_detector()
nlp.add_pipe(language_detector)
doc = nlp('This is some English text.')

doc._.languages  # ['he']
python pycharm spacy
1个回答
0
投票

这不是与安装相关的问题,您正确安装了spacy_langdetect。它没有显示在你的PyCharm解释器下面,因为Pycharm将它视为spacy包下的模块,而不是完全独立的包。如果打开命令提示符,请导航到您正在使用的环境,然后键入pip list,spacy-langdetect包将显示。

© www.soinside.com 2019 - 2024. All rights reserved.