Activate Python Virtual Environment in VSCode

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everybody i hope you are doing well as usual uh today i wanna talk about uh one of common problems in visual studio code that i faced with a couple of days ago as you know when you want when you want to create a project in uh for example a django rest framework or django framework you have to create a virtual environment to deploy your applications but i realized that uh sometimes the visual studio code can't recognize the uh the virtual environment and it can't activate my virtual environment so let's dive in and see how to solve this problem okay i just open the folder select open folder i want to select my project folder project folder online education for example communication chat okay here we have to folder the virtual environment folder and chat project this is our project folder and another one is our virtual environment uh folder okay we select the chat project and here we have two uh different folder chat project and single chat app this is our simple app and that i wrote a couple of days ago and this is our project um folder and directory i select this folder i'm sorry i have to select the sub directory subfolder here add project selected okay i choose a new terminal okay i want to uh activate my virtual environment and in with individual visual studio code so i have to go to the virtual environment directory so i write cd okay virtual environment we have to go to a scripts folder and type activate dot okay uh let's maximize okay as you see the activate pad and here is a is an error here is an error to be faced with and activate that but is not recognized okay now what do we have to do and what should we have to do uh i think it's really simple we have to press ctrl p and shift actually control shift mp and select python and select interpreter after that uh you have to select interpreter path and find okay now you have to go to the virtual environment directory select the script and then select python.xd okay adjust it now close our terminal and create a new terminal okay now you can see our virtual environment is activated and we can deploy our project and our application for example cd okay um python manage dot i run server okay now okay to select it's all later okay and now uh our application is work pro is work properly thank you for watching uh i hope this video is useful for you please subscribe and introduce our our channel to your friends thank you
Info
Channel: Dariush Dehghani
Views: 53,606
Rating: undefined out of 5
Keywords: python Virtual Environment, VSCode, Django Rest Framework
Id: m-GdL-NDxvE
Channel Id: undefined
Length: 4min 50sec (290 seconds)
Published: Sun Feb 07 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.