Change Python Intrepreter of VS Code from virtual to local while debugging

Billapati, Naveen 41 Reputation points
2022-01-28T09:18:50.057+00:00

Hello Everyone, I wanted to debug the azure function locally using VS Code. Previously it was debugged using Python Virtual Environment but, I don't want to use virtual environment anymore. Before debugging it needs to install few dependencies which are listed in requirements.txt file. I have 2 questions. 1. How to setup settings.json file to not use .Venv 2. How to configure pipinstaller task in tasks.json file without using venv please see the attached pictures. ![169328-settings.png][1] ![169423-tasks.png][2] Any help would be highly appreciated. Thanks [1]: /api/attachments/169328-settings.png?platform=QnA [2]: /api/attachments/169423-tasks.png?platform=QnA

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MikeUrnun 9,777 Reputation points Moderator
    2022-02-01T22:43:26.463+00:00

    Hello anonymous user - You can just delete (or rename in case you need it) the .venv directory and remove any references in both settings.json and tasks.json files. Below is what is generated for those files when opting for "Skip Virtual Environment" configuration while creating a new Python function in VS Code:

    settings.json
    170362-image.png

    tasks.json
    170249-image.png

    And if you wanted to install dependencies in your requirements.txt file, add another task in the tasks.json:
    170337-image.png

    0 comments No comments

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.