0
votes

pip install requirements failed for azure-iothub-device-client==1.3.2

I tried to git myPython web app to AZURE WEB APP. My web app is running perfect in local. When I push the code to azure web app, it throws error while doing pip install requirements

PS C:\Users\hackuser1\Desktop\Madhu\tryPythonWeb\python-docs-hello-world> git push azure master
Counting objects: 3, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 324 bytes | 108.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Updating branch 'master'.
remote: Updating submodules.
remote: Preparing deployment for commit id '4bce78d374'.
remote: Generating deployment script.
remote: Running deployment command...
remote: Handling python deployment.
remote: KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'
remote: Copying file: 'requirements.txt'
remote: Detected requirements.txt. You can skip Python specific steps with a .skipPythonDeployment file.
remote: Detecting Python runtime from site configuration
remote: Detected python-2.7
remote: Found compatible virtual environment.
remote: Pip install requirements.
remote: Downloading/unpacking azure-iothub-device-client==1.3.2 (from -r requirements.txt (line 1))
remote: Could not find any downloads that satisfy the requirement azure-iothub-device-client==1.3.2 (from -r requirements.txt (line 1))
remote: Cleaning up...
remote: No distributions at all found for azure-iothub-device-client==1.3.2 (from -r requirements.txt (line 1))
remote: Storing debug log for failure in D:\home\pip\pip.log
remote: An error has occurred during web site deployment.
remote:
remote: Error - Changes committed to remote repository but deployment to website failed.

below is the data in requirements file

azure-iothub-device-client==1.3.2
azure-iothub-service-client==1.3.2
Flask==1.0.2
Flask-Sijax==0.4.1

1

1 Answers

0
votes

The current version of "pip" pre-installed on Function is too old to know how to install a wheel, and you require a wheel since this one includes a C extension. See also: Azure functions: Installing Python modules and extensions on consumption plan

Also, if you want to deploy with git, you might want to install your own Python and this tutorial can give some ideas: https://github.com/Azure-Samples/app-service-msi-keyvault-python#installation-on-azure