Python 无法安装模块 spaCy [英] Python Cannot install module spaCy

查看:25
本文介绍了Python 无法安装模块 spaCy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Python 新手,遇到了无法解决的问题.我想在 python 中安装和使用包 spacy.因此我打开 cmd 并运行

pip install spacy

在安装依赖项时,我收到一条错误消息:

 ----------------------------------------

<块引用>

Command ""c:usersxxxappdatalocalprogramspythonpython37python.exe" -u -c "import setuptools, tokenize;file='C:UsersxxxAppDataLocalTemppip-install-6vcdnb_4 umpysetup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace(' ', ' ');f.close();exec(compile(code, file, 'exec'))" install --recordC:UsersxxxAppDataLocalTemppip-record-jhmti8_8install-record.txt --single-version-externally-managed --compile" 失败,错误代码 1 在 C:UsersxxxAppDataLocalTemppip-install-6vcdnb_4 umpy

但我不知道是什么问题...

有没有人有解决方案?

我使用 Windows 和 python 版本 3.7.0b4

解决方案

好的,这是一个可行的解决方案(至少在 windows 10 和 python3.7 上):

去这里:https://www.lfd.uci.edu/~gohlke/pythonlibs/#spacy

搜索 SpaCy 并为您的平台下载正确的轮子:-

  • 预置
  • cymem
  • 喃喃自语
  • 空间

然后你需要按照上面的顺序用pip install [wheel]安装它们.

如果这不起作用,请尝试从同一站点安装 scipy 甚至 numpy.

I´m new to python and I ran into a problem I can´t solve. I would like to install and use the package spacy in python. Therefore I opened cmd and ran

pip install spacy

While installing the dependecies I get an error message:

    ----------------------------------------

Command ""c:usersxxxappdatalocalprogramspythonpython37python.exe" -u -c "import setuptools, tokenize;file='C:UsersxxxAppDataLocalTemppip-install-6vcdnb_4 umpysetup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace(' ', ' ');f.close();exec(compile(code, file, 'exec'))" install --record C:UsersxxxAppDataLocalTemppip-record-jhmti8_8install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:UsersxxxAppDataLocalTemppip-install-6vcdnb_4 umpy

but I have no idea what´s the problem...

Does anybody has a solution for this?

I use Windows and python version 3.7.0b4

解决方案

Ok, here is a working solution (at least on windows 10 & python3.7):

Go here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#spacy

Search SpaCy and download the correct wheels for your platform :-

  • preshed
  • cymem
  • murmurhash
  • thinc
  • spacy

Then you need to install them with pip install [wheel] in the above order.

If this doesn't work, try installing scipy and maybe even numpy from the same site.

这篇关于Python 无法安装模块 spaCy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆