" python setup.py egg_info"失败,错误代码为1'安装tweet-preprocessor 0.4.0时出错

时间:2018-02-24 12:37:52

标签: python pip tweepy

我尝试使用 pip 安装 tweet-preprocessor 0.4.0 ,但我收到了以下错误

    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\

我遵循了His条款,但收到了同样的错误。

我做错了什么? 我在10号窗口 python 3.6.2 pip version pip 9.0.1 from c:\ python \ python36-32 \ lib \ site-packages(python 3.6)

2 个答案:

答案 0 :(得分:1)

似乎a reported bug并且有一个解决方案 - 修改setup.py并在encoding='utf-8'中添加open()

该错误似乎已在PR #11中修复。尝试安装tweet-preprocessor 0.5.0。

答案 1 :(得分:-1)

基于搜索到的报告信息,Windows似乎尚未修复它(0.50版)。

我在Windows上尝试了以下内容(来自Anaconda频道),并且可以正常运行,不确定是否为其他版本(也显示为0.50):

pip install -i https://pypi.anaconda.org/berber/simple鸣叫预处理器

(Anaconda 4.8,pip 20.0.2,python 3.6)