1

For a Python based Azure function I need to specify the dependencies using requirements.txt.

albumentations==1.2.0
certifi==2022.6.15
charset-normalizer==2.0.12
cycler==0.11.0
Cython==0.29.30
fonttools==4.33.3
idna==3.3
imageio==2.19.3
joblib==1.1.0
kiwisolver==1.4.3
matplotlib==3.5.2
networkx==2.8.4
numpy==1.22.4
opencv-contrib-python==4.6.0.66
opencv-python==4.6.0.66
packaging==21.3
Pillow==9.1.1
pyparsing==3.0.9
python-dateutil==2.8.2
PyWavelets==1.3.0
PyYAML==6.0
qudida==0.0.4
requests==2.28.0
scikit-image==0.18.3
scikit-learn==1.1.1
scipy==1.8.1
six==1.16.0
threadpoolctl==3.1.0
tifffile==2022.5.4
--extra-index-url https://download.pytorch.org/whl/cu113
torch
torchaudio
torchvision
typing-extensions==4.2.0
urllib3==1.26.9
setuptools
pycocotools@git+https://github.com/gautamchitnis/cocoapi.git@cocodataset-master#subdirectory=PythonAPI

When setuptools is installed already, then this works. But when setuptools is not installed, the build of pycocotools fails. How can the requirements.txt file be designed so that this task succeeds? I dont want to use some external commands which parse the requrements.txt file and call pip with each individual package, as this is not possible on Azure as far as I understand (No Azure guy, just need to provide some Python code for Azure).

Can this be done, and if so, how?

Joysn
  • 987
  • 1
  • 16
  • 30

0 Answers0