polyglot
polyglot copied to clipboard
No requirements on python3
When running pip3 install polyglot==16.7.4 no requirements get installed.
See (this uses a fresh python 3.5 docker image with nothing else installed):
$ docker run --rm -it python:3.5 pip3 install polyglot==16.7.4
Collecting polyglot==16.7.4
Downloading polyglot-16.7.4.tar.gz (126kB)
100% |████████████████████████████████| 133kB 1.9MB/s
Installing collected packages: polyglot
Running setup.py install for polyglot ... done
Successfully installed polyglot-16.7.4
For comparison with polyglot==15.10.3:
$ docker run --rm -it python:3.5 pip3 install polyglot==15.10.3
Collecting polyglot==15.10.3
Downloading polyglot-15.10.03-py2.py3-none-any.whl (54kB)
100% |████████████████████████████████| 61kB 1.3MB/s
Collecting PyICU>=1.8 (from polyglot==15.10.3)
Downloading PyICU-1.9.3.tar.gz (179kB)
100% |████████████████████████████████| 184kB 3.0MB/s
Collecting morfessor>=2.0.2a1 (from polyglot==15.10.3)
Downloading Morfessor-2.0.2alpha3.tar.gz
Collecting futures>=2.1.6 (from polyglot==15.10.3)
Downloading futures-3.0.5.tar.gz
Collecting pycld2>=0.3 (from polyglot==15.10.3)
Downloading pycld2-0.31.tar.gz (14.3MB)
100% |████████████████████████████████| 14.3MB 101kB/s
Collecting six>=1.7.3 (from polyglot==15.10.3)
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting wheel>=0.23.0 (from polyglot==15.10.3)
Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
100% |████████████████████████████████| 71kB 11.5MB/s
Installing collected packages: PyICU, morfessor, futures, pycld2, six, wheel, polyglot
Running setup.py install for PyICU ... error
Complete output from command /usr/local/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-68sk36vg/PyICU/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ptkc3_tq-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
copying icu.py -> build/lib.linux-x86_64-3.5
copying PyICU.py -> build/lib.linux-x86_64-3.5
copying docs.py -> build/lib.linux-x86_64-3.5
running build_ext
building '_icu' extension
creating build/temp.linux-x86_64-3.5
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python3.5m -c _icu.cpp -o build/temp.linux-x86_64-3.5/_icu.o -DPYICU_VER="1.9.3"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from _icu.cpp:27:0:
common.h:90:28: fatal error: unicode/utypes.h: No such file or directory
#include <unicode/utypes.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/local/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-68sk36vg/PyICU/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ptkc3_tq-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-68sk36vg/PyICU/
Got the same problem. I imagine, it comes from the way the wheel is created.
There is no requirements.txt in the egg-info in the tar.gz on https://pypi.python.org/pypi/polyglot
I can't reproduce it locally, so I guess this is an error in the release process.
There are Linux dependencies you need to install, please check the documentation.
https://polyglot.readthedocs.io/en/latest/Installation.html
On Wed, Aug 24, 2016, 3:27 AM Alex Garel [email protected] wrote:
There is no requirements.txt in the egg-info in the tar.gz on https://pypi.python.org/pypi/polyglot
I can't reproduce it locally, so I guess this is an error in the release process.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aboSamoor/polyglot/issues/70#issuecomment-242020346, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKglk7LBa71FGS50vzd4PEqzV0-t-s0ks5qjByNgaJpZM4JqzTw .
Hello @aboSamoor , this is not a linux dependency problem ! I had the problem with libicu-dev installed and numpy installed (hand compiled). Please read my analysis above.
Hum this should be related to #67 (and fixed in master).
I hit the same problem, had to pip install pycld2 and morfessor separately.
So I have same problem ,what should I do?
I try to update my GCC to version_8.2,but no use。
@Shengguowei not sure if you still have the problem, but in case you do, I thought I would just post how I installed Polyglot on a barebone CentOS with python 3.6 (I used the docker-image for AWS-Lambda) and made it work (finally!) - maybe that can help you or others.
Since it's barebone, a bunch of stuff needs to be installed, before Polyglot and it's dependencies can be installed. Notice also the three lines setting encoding to UTF-8, which apparently is not default in CentOS. If not set, the installation of Polyglot will fail with some encoding error in a readme file.
yum install -y libicu-devel
yum install -y gcc gcc-c++
yum install -y python36-devel
yum install -y python36-setuptools
easy_install-3.6 pip
pip3 install numpy
pip3 install six
localedef -i en_US -f UTF-8 C.UTF-8
export LANG="C.UTF-8"
export LC_LANG="C.UTF-8"
pip3 install polyglot
pip3 install morfessor
pip3 install PyICU
pip3 install pycld2
As is evident, quite a few packages aside from polyglot is required for the installation to work on a barebone CentOS, but after performing these steps, I am able to get polyglot up and running :)