requirements.txt File not found
- Dominant language
- Python
- Stars
- 7.5k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
Running python 3.11.4, pipreqs 0.5.0
Some censored Output:
```PowerShell
PS .\someproj\> pipreqs \src
INFO: Not scanning for jupyter notebooks.
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "python\Scripts\pipreqs.exe\__main__.py", line 7, in
File "python\Lib\site-packages\pipreqs\pipreqs.py", line 609, in main
init(args)
File "python\Lib\site-packages\pipreqs\pipreqs.py", line 599, in init
generate_requirements_file(path, imports, symbol)
File "python\Lib\site-packages\pipreqs\pipreqs.py", line 209, in generate_requirements_file
with _open(path, "w") as out_file:
File "python\Lib\contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "python\Lib\site-packages\pipreqs\pipreqs.py", line 91, in _open
file = open(filename, mode)
^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/src/requirements.txt'
```
Contributor guide
Research direction
Start by reproducing the PowerShell command `pipreqs \src` with Python 3.11.4 and pipreqs 0.5.0. Read `pipreqs.py` around `_open` (line 91) and `generate_requirements_file` (line 209), then verify that the command handles the reported path and produces the expected requirements file.
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