我正在尝试安装“en_core_web_sm”, 我运行的命令是:
请帮我解决这个问题
#代码
导入 nl_core_news_sm
nlp = nl_core_news_sm.load()
扩展名 = 'pdf'
def create_tokenized_texts_list(扩展名): '''创建两个列表,一个是候选人的名字,一个是标记化的 恢复从 .pdf 或 .doc 中提取的文本''' resume_texts,resume_names = [],[]
# Loop over the contents of the directory containing the resumes, filtering by .pdf or .doc(x)
for resume in list(filter(lambda x: extension in x, os.listdir(PROJECT_DIR + '/CV'))):
if extension == 'pdf':
# Read in every resume with pdf extension in the directory
resume_texts.append(nlp(extract_text_from_pdf(PROJECT_DIR + '/CV/' + resume)))
elif 'doc' in extension:
# Read in every resume with .doc or .docx extension in the directory
resume_texts.append(nlp(extract_text_from_word(PROJECT_DIR + '/CV/' + resume)))
resume_names.append(resume.split('_')[0].capitalize())
这是我要运行的代码
我遇到了同样的问题,然后这样解决了:首先,我更新了 Conda,在 Conda 自己的 Powershell 上运行这个命令
conda update -n base -c defaults conda
然后在同一个 PowerShell 中,运行 Spacy 文档中的这两个命令:conda install -c conda-forge spacy python -m spacy download en_core_web_sm
来源:https://spacy.io/usage
升级到 click v8,例如与
pip install 'click~=8.0'
.
您必须通过运行
pip install -U click
来升级库点击
如果你使用的是Jupyter,升级后点击重置内核。