Search code examples
pythonazure-devopsazure-artifacts

Install Packages in Custom Feed Using a .txt File


I want to be able to install packages that exist in an Azure Artifacts feed.

I know this can be done using a command similar to this,

pip install <package-name> --extra-index-url https://<feed-name>:<DEVOPS_TOKEN>@pkgs.dev.azure.com/<org-name>/<project-name>/_packaging/<feed-name>/pypi/simple/

However, is there some way that I can maintain these packages and their versions in something like a requirements.txt file and then install all of them using a single command like pip install -r requirements.txt?


Solution

  • The only way I got this to work is by including the --extra-index-url argument at the top of my requirements.txt file.

    If I am to borrow from the answer @sachin has posted, it needed to be like this,

    --extra-index-url https://:@pkgs.dev.azure.com///_packaging//pypi/simple/
    stack==2.3.1
    overflow==0.12.2
    fun==0.63.0