Infrastructure and/or software involved: Azure Cloud, Linux Machine and Python 3.9
Objective: Deployment of an Azure Function (Built in Python) through Terraform script and Azure cloud shell
Context: I created a Terraform script which I will execute on Azure cloud shell in order to deploy an Azure Function in the Cloud. The script installs all the python packages I need to that Function. I am facing a problem with the installation of the package called compound-split. I am getting the following error:
No such file or directory
when the script runs the following command:
pip3 install -r compound-split==1.0.2 --target="${SCRIPT_DIR}/build/.python_packages/lib/site-packages"
I found the current Linux machine has only installed the python version 3.7.
Question: Anyone knows what this problem is about?. Any suggestions how should I install this package in that machine?
Tks in advance and forgive me if I explained something incorrectly.
UPDATE 1:
The complete error is:
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'compound-split==1.0.2'
I checked the version of the pip installed and I got the following result in the cloud shell:
pip3 --version
pip 22.1 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7)
CodePudding user response:
You are using the command in a false way.
The option -r
specifies the use of a requirements file.
You may want to use the command without the -r
option to install the package directly, rather than from a requirements file.
pip3 install compound-split==1.0.2 --target="${SCRIPT_DIR}/build/.python_packages/lib/site-packages"
For more information see the options section of the man page