Reputation: 51
I'm trying to install 'polyglot' using the below command
pip install polyglot
But I'm getting the below error
Command "python setup.py egg_info" failed with error code 1 in C:\Users\K~1.SHA\AppData\Local\Temp\pip-install-tcez0ptg\polyglot\
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
How can I install polyglot successfully? Any help on this is appreciated.
Upvotes: 3
Views: 3204
Reputation: 664
To install polyglot in Windows using a Python 3.6 or Python 3.7 you will need a wheel for two dependencies:
You need to download them and then install them with pip on your local machine.
Here you will find many unofficial python builds: https://www.lfd.uci.edu/~gohlke/pythonlibs/
In both cases you will need be able to choose the right version of the build for your windows version and your python version.
It's easy, for example for PyICU:
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
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.
Once you have download them you will need to install it using pip in your python environment:
In my case:
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
Upvotes: 4