pipreqs 生成requirements.txt文件时编码错误问题

1,首先安装pipreqs --> pip install pipreqs

2.生成相应项目的路径  --》 pipreqs  e:\a\b  

  在此时可能会遇见 

UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 776: illegal multibyte sequence

这个错误.

解决方法:指定编码格式      pipreqs e:\a\b  --encoding=utf8

  之后会生成requirements.txt 文件,包含了此路径下项目中的依赖项。

  用法:pip install -r requriements.txt 即可安装所有依赖

猜你喜欢

转载自www.cnblogs.com/king123/p/9626537.html