Skip to content

[BUG] extension not recognizing additional options in requirements.txt #843

@cooper-grill

Description

@cooper-grill

Describe the bug
I have --extra-index-url defined on the first line of my requirements.txt file, and getting the error

--extra-index-url is not installed in your python environment, either install it (better to install requirements.txt altogether) or set the setting Use Python Virtual Environment=true to automatically install it in virtual environment (please note that this may slow down the analysis)

This also noticeably slows vscode "on save" actions

To Reproduce
create a requirements.txt file with the following contents:

--extra-index-url=https://download.pytorch.org/whl/cpu
torch==2.8.0+cpu

and save the file

Expected behavior
Ignore lines in the requirements.txt that define extra options

VSCode(please complete the following information):

  • OS: Windows 11 (WSL environment)
  • VSCode: 1.104.1
  • Dependency Analytics Version: 0.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions