Reputation: 109
Hi I'm trying to build a pipeline using python in Azure. The problem is when I build the pipeline I'm getting the error "Install Python dependencies."
The official documentation talks about building a requirements.txt that uses pip to install the dependencies. https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/python?view=azure-devops
The problem is I don't know how to make it so that the pipeline will read the requirements file and automatically install those dependencies before it reads the .py file.
These are the dependencies I need to install
pip install pandas
pip install openpyxl
pip install tkinter
I'd be grateful for any help you can provide.
Upvotes: 2
Views: 10728
Reputation: 1569
This does not require a pipeline.
Instead, you leverage existing CMD
, Bash
or Powershell
tasks. You should create a file with all your requirements.
Then, you just specify the python
commands to run in your pipeline.
E.g. python -m pip install -r requirements.txt
Have a look at how I built a pipe in my project as a reference.
I use a virtual environment not to pollute anything outside my pipeline.
Upvotes: 3