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.11k stars 383 forks source link

pipreqs confuses secrets package with standard library #163

Open mrapacz opened 5 years ago

mrapacz commented 5 years ago

I've just tried running pipreqs for my project. It seemed to work fine until the project's CI crashed telling me:

ERROR: ERROR: No matching distribution found for secrets==1.0.2

Pipreqs thought it's the secrets package, while in reality it was secrets standard library. Removing the 'secrets==1.0.2' manually from requirements.txt fixed the issue.

The package cannot be installed on Python 3.7 and I'm running Python 3.7, so technically it's clear which module I want to import in my code.

Is there a way for pipreqs to solve this issue automatically or will I need to fix it manually upon every requirements.txt regeneration?

imlison commented 5 years ago

This library is missing some standard libraries.

Axios1027 commented 4 years ago

the same situation