|、第一步放bug
Traceback (most recent call last): File "c:\programdata\anaconda3\envs\sql\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\programdata\anaconda3\envs\sql\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\ProgramData\Anaconda3\envs\sql\Scripts\pipreqs.exe\__main__.py", line 9, in <module> File "c:\programdata\anaconda3\envs\sql\lib\site-packages\pipreqs\pipreqs.py", line 470, in main init(args) File "c:\programdata\anaconda3\envs\sql\lib\site-packages\pipreqs\pipreqs.py", line 409, in init follow_links=follow_links) File "c:\programdata\anaconda3\envs\sql\lib\site-packages\pipreqs\pipreqs.py", line 122, in get_all_imports contents = f.read() UnicodeDecodeError: 'gbk' codec can't decode byte 0xab in position 2411: illegal multibyte sequence
II、解决方案
根据bug提示就知道是编码出现问题,所以只需要改变编码
1、找到pipreqs包的位置
在bug中有提示,已经具体显示到第几行
2、修改编码
根据上面提示的行数直接找到源头,修改,完成
保存,ok
重新导出