Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pipreqs has the unicode Error under a virtualenv

I tried to use pipeqs to generate requirements.txt in a virtual environment (virtualenv).

However, I got an error as follows:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 184: ordinal not in range(128)


Then I tried:

pipreqs --encoding=utf-8

And still got the error saying:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa4 in position 64: invalid start byte

Not sure anyone knows how to solve the issue.

like image 750
sweetyBaby Avatar asked May 07 '26 23:05

sweetyBaby


1 Answers

I got exactly same error. Reading Theo answer, I figured workaround in venv

pipreqs --ignore bin,etc,include,lib,lib64
like image 195
cacoch Avatar answered May 09 '26 13:05

cacoch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!