pip install ... ERROR: UnicodeDecodeError: ‘gbk‘ codec can‘t decode/ python setup.py egg_info Check

1. pip install 安装包报错如下

ERROR: UnicodeDecodeError: 'gbk' codec can't decode/ python setup.py egg_info Check

(base) C:\Users\user>pip download igramscraper
Collecting igramscraper
  Using cached igramscraper-0.3.5.tar.gz (24 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\user\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-download-zwiz5cy9\\igramscraper\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-download-zwiz5cy9\\igramscraper\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\user\AppData\Local\Temp\pip-pip-egg-info-rqfp96y7'
         cwd: C:\Users\user\AppData\Local\Temp\pip-download-zwiz5cy9\igramscraper\
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\user\AppData\Local\Temp\pip-download-zwiz5cy9\igramscraper\setup.py", line 8, in <module>
        long_description=Path("README.md").read_text(),
      File "c:\users\user\anaconda3\lib\pathlib.py", line 1200, in read_text
        return f.read()
    UnicodeDecodeError: 'gbk' codec can't decode byte 0xa4 in position 721: illegal multibyte sequence
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

报错图片如下:

 

2.解决方案

根据报错提示,应该是 README.md这个文件编解码报错的问题 (UnicodeDecodeError: 'gbk' codec can't decode),

解决方案:

1、下载好安装包的压缩包

2、进入报错位置,进行处理, 这里我选择注释掉(1.注释报错行代码  or  2.清空README.md文件)

3、命令行运行安装压缩包  pip install instagram-scraper-master.zip

 

 

 

 

-------------- END -------------------- 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值