0

I'm trying to installing tweet-preprocessor 0.4.0 using pip but I am getting the following error

    C:\Users\Bilal>pip3 install tweet-preprocessor
Collecting tweet-preprocessor
  Using cached tweet-preprocessor-0.5.0.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\Bilal\AppData\Local\Temp\pip-build-0way1c0h\tweet-preprocessor\setup.py", line 6, in <module>
        long_description = f.read()
      File "c:\python\python36-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 0x8d in position 652: character maps to <undefined>

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Bilal\AppData\Local\Temp\pip-build-0way1c0h\tweet-preprocessor\

I followed these instructions but I received the same error.

What am I doing wrong? I am on Windows 10 python 3.6.2 pip version pip 9.0.1 from c:\python\python36-32\lib\site-packages (python 3.6)

snakecharmerb
  • 47,570
  • 11
  • 100
  • 153
Bilal Butt
  • 1,202
  • 3
  • 12
  • 15

2 Answers2

1

It seems like a reported bug and there is a solution — edit setup.py and add encoding='utf-8' in open().

The bug seems to be fixed in PR #11. Try to install tweet-preprocessor 0.5.0.

phd
  • 82,685
  • 13
  • 120
  • 165
  • 1
    thanks @phd . but now i download it from **github** and install it by following instruction on github and its works fine. first 'python setup.py build' then 'python setup.py install'. in this way it didnt show error. BTW thanks for your comment. – Bilal Butt Feb 24 '18 at 16:10
-1

Seems it (verion 0.50) is not fixed for windows yet based on the report info i searched.

I tried with the following (from Anaconda channel) on windows and it works, not sure it is a different version (also stated 0.50):

pip install -i https://pypi.anaconda.org/berber/simple tweet preprocessor

(Anaconda 4.8, pip 20.0.2, python 3.6)

r poon
  • 633
  • 7
  • 7