Unable to install azure-keyvault-secrets on local Azure function project

Rios, Andres 0 Reputation points
2023-02-21T17:05:47.74+00:00

Hi. Any help would be enormously appreciated.

I was able to convince my company to use services written in Python by deploy them into the Azure Cloud.

We are however stuck with this error for days without a solution (we have spent hours searching on the web for a solution but we haven't been able to find anything related):

I added azure-keyvault-secrets to my 'requirements.txt' file of an Azure Function in python within a local Azure Project. When I try to run the function, I always get the following error, only for that package:

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory:

'C:\Users\' ... ... ... ... '\App\.venv\Lib\site-packages\azure\keyvault\secrets\_generated\v2016_10_01\aio\operations\_key_vault_client_operations.py'

All other packages in 'requirements.txt' are correctly installed when running the Azure function.

Also, I have been able to just run <

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,448 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,911 questions
{count} votes

1 answer

Sort by: Most helpful
  1. JamesTran-MSFT 36,906 Reputation points Microsoft Employee Moderator
    2023-03-03T11:46:55.7833333+00:00

    @Rios, Andres

    Thank you for your post and I apologize for the delayed response!

    Error Message:

    ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory:
    'C:\Users\' ... ... ... ... '\App\.venv\Lib\site-packages\azure\keyvault\secrets\_generated\v2016_10_01\aio\operations\_key_vault_client_operations.py'
    

    From your error message, I found some related issues that were resolved using the pip command - pip install 'package name' --user, can you see if running this helps resolve your issue?

    If you're still having issues and to gain a better understanding of your issue:

    • Can you share any screenshots and documentation you're following to set this up?
    • Since you're getting this error when trying to run your Python Function app, have you tried reaching out to our Python experts via the Python Stack Overflow forum(s)?

    Additional Links:


    If you have any other questions, please let me know. Thank you for your time and patience throughout this issue.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.