No imports found? "Writing 0 requirements"
- Dominant language
- Python
- Stars
- 7.5k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
`pipreqs --debug ./file.py --force --savepath ./requirements.txt` produces:
```
DEBUG: Found packages: set()
DEBUG: Found imports:
DEBUG: Getting packages information from Local/PyPI
DEBUG: Writing 0 requirements: to ./requirements.txt
INFO: Successfully saved requirements file in ./requirements.txt
```
`file.py` "import" contents:
```
import os
import sys
import time
import zipfile
import argparse
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
```
Not sure why it's not finding anything...
Contributor guide
Research direction
Start by reproducing the reported pipreqs command with the shown file.py imports and inspect the debug output. Trace why the imports are not detected, then verify that the command recognizes the imports and writes the expected requirements to ./requirements.txt.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100