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

pipreqs mapping - cv2 to opencv-python #307

Open adventure2165 opened 2 years ago

adventure2165 commented 2 years ago

Hello.

I notice that pipreq failed to recognize cv2.

First, i tried to figure out the reason, and found that the pypi server have the cv2 package name as opencv-python, not cv2.

and i found the file names mapping, which has the package names to mapping input package name to already defined names.

so i add cv2:opencv-python, and it actually worked.

But I don't know if I can edit it like this and I'd like to ask if it's okay to modify this way. I wish someone could check it out. Thanks.

fzyzcjy commented 2 years ago

+1