the requirementtxt file in pipreqs is not correct

So the issue I had was that my actual workspace was:

MyProject
 |- .venv   // <- My Python Virtual Environment
 |- test.py

My Python Virtual Environment was in my Project folder so when I run the command

pipreqs ./

it is looking at all the dependencies of all the files in the folder (including my virtual environment) and that is why it was generating a weird requirements.txt file.

To fix this, I used the option --ignore of pipreqs:

pipreqs ./ --ignore .venv

And the generated requirements.txt is:

selenium==3.141.0

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top