Issue with libraries with hyphens "-" in the name
- Dominant language
- Python
- Stars
- 7.5k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
I have a project with "cv2" and "scikit-learn" but when i used the command
`pipreqs . --force --mode no-pin`
It was giving the requirements.txt as
> noise
> numpy
> opencv_python
> Pillow
> scikit_learn
> scipy
> skimage
> torch
> torchvision
> tqdm
As you can see the opencv-python is written as opencv_python (which is in correct manner "opencv-python") and more of the bad one is "skimage" which is really "scikit-image".
If I am doing something wrong please guide me.
Contributor guide
Research direction
Start by reproducing `pipreqs . --force --mode no-pin` with imports for `cv2`, `scikit-learn`, and `skimage`, then trace the command's import-to-distribution-name mapping. Done means the generated requirements.txt uses `opencv-python` and `scikit-image` rather than underscore or shortened names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100