Python无法安装模块spaCy [英] Python Cannot install module spaCy
问题描述
我是python的新手,遇到了一个我无法解决的问题. 我想在python中安装和使用spacy软件包. 因此,我打开cmd并运行
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:
----------------------------------------
命令" c:\ users \ xxx \ appdata \ local \ programs \ python \ python37 \ python.exe"-u -c"导入setuptools,标记化; 文件 ='C:\ Users \ xxx \ AppData \ Local \ Temp \ pip-install-6vcdnb_4 \ numpy \ setup.py'; f = getattr(tokenize,'open',open)( file ); code = f. read().replace('\ r \ n','\ n'); f.close(); exec(compile(code, file ,'exec'))"install --record C:\ Users \ xxx \ AppData \ Local \ Temp \ pip-record-jhmti8_8 \ install-record.txt --single-version-externally-managed --compile在C:\ Users \ xxx \中失败,错误代码为1 AppData \ Local \ Temp \ pip-install-6vcdnb_4 \ numpy \
Command ""c:\users\xxx\appdata\local\programs\python\python37\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\xxx\AppData\Local\Temp\pip-install-6vcdnb_4\numpy\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\xxx\AppData\Local\Temp\pip-record-jhmti8_8\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\xxx\AppData\Local\Temp\pip-install-6vcdnb_4\numpy\
但我不知道这是什么问题...
but I have no idea what´s the problem...
有人对此有解决方案吗?
Does anybody has a solution for this?
我使用Windows和python 3.7.0b4版本
I use Windows and python version 3.7.0b4
推荐答案
好的,这是一个可行的解决方案(至少在Windows 10和python3.7上):
Ok, here is a working solution (at least on windows 10 & python3.7):
转到此处: https://www.lfd.uci.edu/〜gohlke/pythonlibs/#spacy
搜索SpaCy
并为您的平台下载正确的轮子:-
Search SpaCy
and download the correct wheels for your platform :-
- 压制
- cymem
- murmurhash
- thinc
- spacy
然后您需要按上述顺序在pip install [wheel]
中安装它们.
Then you need to install them with pip install [wheel]
in the above order.
如果这不起作用,请尝试从同一站点安装scipy
甚至numpy
.
If this doesn't work, try installing scipy
and maybe even numpy
from the same site.
这篇关于Python无法安装模块spaCy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!