bndr / pipreqs

pipreqs - Generate pip requirements.txt file based on imports of any project. Looking for maintainers to move this project forward.
Apache License 2.0
6.38k stars 388 forks source link

Wrong version for the requests package #230

Closed petasis closed 3 years ago

petasis commented 3 years ago

Hi all,

There is a package installed from the os package manager (requests==2.22.0), and then there is requests==2.25.1 installed with pip install --user.

pip freeze returns requests==2.25.1. pipreqs returns requests==2.22.0. How to fix this?

No matter if I use --use-local.

alan-barzilay commented 3 years ago

This probably happens because your "OS python" is not really the same as your "user python", if you want to generate a requirements.txt with respect to your user python you have to force its use instead of the OS one. Using a virtual environment might help. The --use-local flag has nothing to do with this so it shouldn't help either