多语言安装 [英] Polyglot Installation

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

问题描述

我正在尝试使用以下命令安装'polyglot'

I'm trying to install 'polyglot' using the below command

pip install polyglot

但是我遇到了以下错误

Command "python setup.py egg_info" failed with error code 1 in C:\Users\K~1.SHA\AppData\Local\Temp\pip-install-tcez0ptg\polyglot\

我的python版本是Python 3.6.4由于我是python的新手,所以我尝试了以下在网上找到的命令,但它们并没有帮助

My python version is Python 3.6.4 Since I'm new to python I tried the below commands which I found online but they haven't helped

python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install --upgrade pip setuptools wheel

如何成功安装Polyglot?感谢您的任何帮助.

How can I install polyglot successfully? Any help on this is appreciated.

推荐答案

要在使用Python 3.6或Python 3.7的Windows中安装多语言版本,您将需要一个带有两个依赖项的轮子:

To install polyglot in Windows using a Python 3.6 or Python 3.7 you will need a wheel for two dependencies:

您需要下载它们,然后以pip的方式将它们安装在本地计算机上.

You need to download them and then install them with pip on your local machine.

在这里,您会发现许多非官方的python版本: https://www.lfd.uci.edu/~gohlke/pythonlibs/

Here you will find many unofficial python builds: https://www.lfd.uci.edu/~gohlke/pythonlibs/

在两种情况下,您都需要能够为Windows版本和python版本选择正确的版本.

In both cases you will need be able to choose the right version of the build for your windows version and your python version.

这很容易,例如 PyICU :

PyICU包装了ICU(Unicode国际组件)库.

PyICU wraps the ICU (International Components for Unicode) library.

PyICU‑2.3.1‑cp27‑cp27m‑win32.whl
PyICU‑2.3.1‑cp27‑cp27m‑win_amd64.whl
PyICU‑2.3.1‑cp35‑cp35m‑win32.whl
PyICU‑2.3.1‑cp35‑cp35m‑win_amd64.whl
PyICU‑2.3.1‑cp36‑cp36m‑win32.whl
PyICU‑2.3.1‑cp36‑cp36m‑win_amd64.whl
PyICU‑2.3.1‑cp37‑cp37m‑win32.whl
PyICU‑2.3.1‑cp37‑cp37m‑win_amd64.whl

27表示Python 2.7,而36表示Python 3.6 ...如果您拥有64位的python和Windows,请选择amd64,而不是win32版本.

the 27 means Python 2.7 and the 36 Python 3.6... If you have 64 bits python and windows then choose the amd64 otherwhise the win32 version.

一旦下载了它们,则需要在python环境中使用pip安装它:

Once you have download them you will need to install it using pip in your python environment:

就我而言:

python -m pip install C:\Users\Administrator\Downloads\pycld2-0.31-cp37-cp37m-win_amd64.whl
python -m pip install C:\Users\Administrator\Downloads\PyICU-2.3.1-cp37-cp37m-win_amd64.whl
pip install git+https://github.com/aboSamoor/polyglot@master

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

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