Error installing polyglot package in Python by pip

4

I'm trying to install this package / module by pip and I can not find the solution. Follow Traceback :

C:\Users\chris>pip install polyglot
Collecting polyglot
  Using cached polyglot-16.7.4.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "C:\Users\chris\AppData\Local\Temp\pip-build-4kfxalco\polyglot\setup.py", line 15, in <module>
         readme = readme_file.read()
        File "c:\users\chris\appdata\local\programs\python\python35-32\lib\encodings\cp1252.py", line 23, in decode
         return codecs.charmap_decode(input,self.errors,decoding_table)[0]
    UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 4941: character maps to <undefined>

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\chris\AppData\Local\Temp\pip-build-4kfxalco\polyglot\

What's happening? I've already done these operations:

  
  • python -m pip install --upgrade pip
  •   
  • pip install setuptools
  •   
  • pip install setuptools --upgrade
  •   
  • pip install ez_setup
  •   
    
asked by anonymous 08.07.2016 / 21:48

1 answer

2

Pip has a unicode bug that has not yet been fixed. You will need to download the font and install .egg , like this:

PS C:\Users\cigano\Documents\python-projects> git clone https://github.com/aboSamoor/polyglot
Cloning into 'polyglot'...
remote: Counting objects: 1258, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 1258 (delta 3), reused 0 (delta 0), pack-reused 1242R
Receiving objects: 100% (1258/1258), 403.05 KiB | 376.00 KiB/s, done.
Resolving deltas: 100% (808/808), done.
Checking connectivity... done.
PS C:\Users\cigano\Documents\python-projects> ls


    Diretório: C:\Users\cigano\Documents\python-projects


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       08/07/2016     17:38                polyglot
PS C:\Users\cigano\Documents\python-projects> cd .\polyglot\
PS C:\Users\cigano\Documents\python-projects\polyglot> python setup.py install
C:\Program Files\Python35\lib\site-packages\setuptools\dist.py:285: UserWarning: Normalizing '16.07.04' to '16.7.4'
  normalized_version,
running install
running bdist_egg
running egg_info
creating polyglot.egg-info
writing dependency_links to polyglot.egg-info\dependency_links.txt
writing entry points to polyglot.egg-info\entry_points.txt
writing top-level names to polyglot.egg-info\top_level.txt
writing polyglot.egg-info\PKG-INFO
writing manifest file 'polyglot.egg-info\SOURCES.txt'
reading manifest file 'polyglot.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
writing manifest file 'polyglot.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build
creating build\lib
creating build\lib\polyglot
copying polyglot\base.py -> build\lib\polyglot
copying polyglot\decorators.py -> build\lib\polyglot
copying polyglot\downloader.py -> build\lib\polyglot
copying polyglot\load.py -> build\lib\polyglot
copying polyglot\mixins.py -> build\lib\polyglot
copying polyglot\text.py -> build\lib\polyglot
copying polyglot\utils.py -> build\lib\polyglot
copying polyglot\__init__.py -> build\lib\polyglot
copying polyglot\__main__.py -> build\lib\polyglot
creating build\lib\polyglot\detect
copying polyglot\detect\base.py -> build\lib\polyglot\detect
copying polyglot\detect\langids.py -> build\lib\polyglot\detect
copying polyglot\detect\__init__.py -> build\lib\polyglot\detect
creating build\lib\polyglot\tokenize
copying polyglot\tokenize\base.py -> build\lib\polyglot\tokenize
copying polyglot\tokenize\__init__.py -> build\lib\polyglot\tokenize
creating build\lib\polyglot\mapping
copying polyglot\mapping\base.py -> build\lib\polyglot\mapping
copying polyglot\mapping\embeddings.py -> build\lib\polyglot\mapping
copying polyglot\mapping\expansion.py -> build\lib\polyglot\mapping
copying polyglot\mapping\__init__.py -> build\lib\polyglot\mapping
creating build\lib\polyglot\tag
copying polyglot\tag\base.py -> build\lib\polyglot\tag
copying polyglot\tag\__init__.py -> build\lib\polyglot\tag
creating build\lib\polyglot\transliteration
copying polyglot\transliteration\base.py -> build\lib\polyglot\transliteration
copying polyglot\transliteration\__init__.py -> build\lib\polyglot\transliteration
creating build\bdist.win-amd64
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\polyglot
copying build\lib\polyglot\base.py -> build\bdist.win-amd64\egg\polyglot
copying build\lib\polyglot\decorators.py -> build\bdist.win-amd64\egg\polyglot
creating build\bdist.win-amd64\egg\polyglot\detect
copying build\lib\polyglot\detect\base.py -> build\bdist.win-amd64\egg\polyglot\detect
copying build\lib\polyglot\detect\langids.py -> build\bdist.win-amd64\egg\polyglot\detect
copying build\lib\polyglot\detect\__init__.py -> build\bdist.win-amd64\egg\polyglot\detect
copying build\lib\polyglot\downloader.py -> build\bdist.win-amd64\egg\polyglot
copying build\lib\polyglot\load.py -> build\bdist.win-amd64\egg\polyglot
creating build\bdist.win-amd64\egg\polyglot\mapping
copying build\lib\polyglot\mapping\base.py -> build\bdist.win-amd64\egg\polyglot\mapping
copying build\lib\polyglot\mapping\embeddings.py -> build\bdist.win-amd64\egg\polyglot\mapping
copying build\lib\polyglot\mapping\expansion.py -> build\bdist.win-amd64\egg\polyglot\mapping
copying build\lib\polyglot\mapping\__init__.py -> build\bdist.win-amd64\egg\polyglot\mapping
copying build\lib\polyglot\mixins.py -> build\bdist.win-amd64\egg\polyglot
creating build\bdist.win-amd64\egg\polyglot\tag
copying build\lib\polyglot\tag\base.py -> build\bdist.win-amd64\egg\polyglot\tag
copying build\lib\polyglot\tag\__init__.py -> build\bdist.win-amd64\egg\polyglot\tag
copying build\lib\polyglot\text.py -> build\bdist.win-amd64\egg\polyglot
creating build\bdist.win-amd64\egg\polyglot\tokenize
copying build\lib\polyglot\tokenize\base.py -> build\bdist.win-amd64\egg\polyglot\tokenize
copying build\lib\polyglot\tokenize\__init__.py -> build\bdist.win-amd64\egg\polyglot\tokenize
creating build\bdist.win-amd64\egg\polyglot\transliteration
copying build\lib\polyglot\transliteration\base.py -> build\bdist.win-amd64\egg\polyglot\transliteration
copying build\lib\polyglot\transliteration\__init__.py -> build\bdist.win-amd64\egg\polyglot\transliteration
copying build\lib\polyglot\utils.py -> build\bdist.win-amd64\egg\polyglot
copying build\lib\polyglot\__init__.py -> build\bdist.win-amd64\egg\polyglot
copying build\lib\polyglot\__main__.py -> build\bdist.win-amd64\egg\polyglot
byte-compiling build\bdist.win-amd64\egg\polyglot\base.py to base.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\decorators.py to decorators.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\detect\base.py to base.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\detect\langids.py to langids.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\detect\__init__.py to __init__.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\downloader.py to downloader.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\load.py to load.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\mapping\base.py to base.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\mapping\embeddings.py to embeddings.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\mapping\expansion.py to expansion.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\mapping\__init__.py to __init__.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\mixins.py to mixins.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\tag\base.py to base.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\tag\__init__.py to __init__.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\text.py to text.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\tokenize\base.py to base.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\tokenize\__init__.py to __init__.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\transliteration\base.py to base.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\transliteration\__init__.py to __init__.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\utils.py to utils.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\__init__.py to __init__.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\polyglot\__main__.py to __main__.cpython-35.pyc
creating build\bdist.win-amd64\egg\EGG-INFO
copying polyglot.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying polyglot.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying polyglot.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying polyglot.egg-info\entry_points.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying polyglot.egg-info\not-zip-safe -> build\bdist.win-amd64\egg\EGG-INFO
copying polyglot.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
creating dist
creating 'dist\polyglot-16.7.4-py3.5.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing polyglot-16.7.4-py3.5.egg
creating c:\program files\python35\lib\site-packages\polyglot-16.7.4-py3.5.egg
Extracting polyglot-16.7.4-py3.5.egg to c:\program files\python35\lib\site-packages
Adding polyglot 16.7.4 to easy-install.pth file
Installing polyglot-script.py script to C:\Program Files\Python35\Scripts
Installing polyglot.exe script to C:\Program Files\Python35\Scripts

Installed c:\program files\python35\lib\site-packages\polyglot-16.7.4-py3.5.egg
Processing dependencies for polyglot==16.7.4
Finished processing dependencies for polyglot==16.7.4

I made using Powershell in administrator mode. With normal user gives permission denied.

    
08.07.2016 / 22:43