How To Setup A Virtual Environment For Python In Visual Studio Code In 2023

  Рет қаралды 299,381

Indently

Indently

Жыл бұрын

Here's how you can setup a virtual environment in Visual Studio Code for Python.
▶ Become job-ready with Python:
www.indently.io
▶ Follow me on Instagram:
/ indentlyreels

Пікірлер: 180
@rolandonunez1893
@rolandonunez1893 4 ай бұрын
For those that didn't get the venv after restarting the terminal and had an error regarding to Execution Policies, just run in the terminal the following script: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser and then: .\.venv\Scripts\activate (for Windows)
@asioud
@asioud 4 ай бұрын
Goat
@lyndaraid3401
@lyndaraid3401 3 ай бұрын
Very useful comment 👍🏻
@artyCrafty4564
@artyCrafty4564 3 ай бұрын
thanxxxxxxxxx mannnnnnnnnnnnn
@Harshitha--wq1jq
@Harshitha--wq1jq 3 ай бұрын
thanks
@sushmitarawat6438
@sushmitarawat6438 2 ай бұрын
Thanks a ton😊
@azekhuoriadignity2360
@azekhuoriadignity2360 Ай бұрын
for those that did not get the (env name) in terminal path, which is supposed to be displayed in the panel after activation, its normal on Vs code right now. You can hover over the powershell or cmd button on the top of the panel to see the extensions that have contributed to the terminal environment. There you will see your virtual env running.
@Moxaji
@Moxaji Ай бұрын
thank you, this was my issue, I was confused
@azekhuoriadignity2360
@azekhuoriadignity2360 29 күн бұрын
@@Moxaji you’re welcome
@kiyingipisgah4365
@kiyingipisgah4365 Жыл бұрын
It has taken me hours to import modules in python but after following this, I can firmly say that I have landed. Btw am a self taught programmer/coder and this was really helpful.😊
@NewParadigmAI-zm9lj
@NewParadigmAI-zm9lj 8 ай бұрын
This is the best damned instructional ever. Honestly, so many 20 minute videos, and this dude knocks it out of the park.
@zeebeat123
@zeebeat123 Ай бұрын
Couldn't agree more. I have watched SO many videos and they are much longer, and many leave out small but essential details
@user-tr8xg7yr6e
@user-tr8xg7yr6e 18 күн бұрын
As someone who is just starting out and really needs the things that are understood by everyone, I appreciate this video. Thanks.
@andrewclayburn5920
@andrewclayburn5920 11 ай бұрын
wow I wasted so many hours trying to figure out what the hell was going on before finally finding this video and solving it in seconds, thanks man I appreciate it!
@boitedamour
@boitedamour 4 ай бұрын
after 4 hours of search, your tutorial saved my life . thanks
@kenbajema
@kenbajema 6 ай бұрын
Now the dozens of videos I've watched regarding installing Autogen and memgpt etc make sense!! thank you. I've been using conda environments and have had a difficult time finding the and editing the correct .py files! for packages and running them.
@JamesRBentley
@JamesRBentley Жыл бұрын
bro this is the best tutorial on how to do this, clear, simple, perfectly illustrated for beginners
@amigobrewbrew9297
@amigobrewbrew9297 Жыл бұрын
As a beginner I was lost but now it all makes sense. Thanks!
@throbicon
@throbicon 10 ай бұрын
Thank you so much Indently! This is the easiest way to make a virtual environment. Please continue to make videos; they are valuable!
@abubakr9796
@abubakr9796 Жыл бұрын
Love your videos bro! Easy and simple to understand tutorials and explanations.
@abdullahattia2491
@abdullahattia2491 Жыл бұрын
simple enough and straight to the point thanks!
@AbdulKareemAbdulRahman
@AbdulKareemAbdulRahman Жыл бұрын
how would one upgrade the phyton in a virt environment? thanks? for instance my system wide python says it is 3.11.3 but my venv says it is 3.7. wld be grateful for any help or signposting
@Dasol0246
@Dasol0246 7 ай бұрын
What happens when I run the .py program on another machine, do I need the pip package I installed in the virtual environment or once written I won’t need the pip package?
@rick.d
@rick.d 10 ай бұрын
couldn't have been more perfect. thanks!
@ivosacagami121
@ivosacagami121 3 ай бұрын
i`m having a problem with the venv on the windows. Everytime that I reopen the project, like the next day, I have to reactivate the virtual enviroment. Is that correct? Do I have another way to do it? what I`m doing is opening the cmd on the folder and then running "code . " to open vscode with the right directory. then I have to go and put the "Set-ExecutionPolicy Unrestricted -Scope Process" and then ".\ .venv\Scripts\activate" everytime. What am I doing wrong? or is that normal ? PLease
@fakalakaloo
@fakalakaloo 7 ай бұрын
Helped a lot. Simple, clear, understandable!
@cosmic_9
@cosmic_9 8 ай бұрын
Thank you for explaining it as well! I'm trying to comperhend every basic principle vs code and python has to offer and hit a wall here.
@charlessnachez4248
@charlessnachez4248 2 ай бұрын
Why the « pip install discord » int he folder didnt work but it worked in the venv environment ? Is it because of some conflict with other global python packages?
@MushroomPower84
@MushroomPower84 Жыл бұрын
Thank you for your work! I've already learned a lot by this channel.
@al.habibii
@al.habibii 3 ай бұрын
Hello, i'm creating a new folder named 'folder', and then following this step. But why after print('Hello!'), and text 'pip install discord' in vscode terminal, my vscode install discord? as i see in this video, there must be command not found: pip, but that's not happened in my vscode..
@bensonkamau1844
@bensonkamau1844 11 ай бұрын
actually when creating a new python file, if you create a requirements.txt under it and add modules to be used, vscode displays a button on the bottom left side asking you whether you want to create a new environment
@go_away_plz
@go_away_plz Жыл бұрын
This tutorial really helped me. Thank you very much!
@notgamerboy8048
@notgamerboy8048 Жыл бұрын
great tuotrial, it took me a few hours to figure it out by my self last time, but this time it took like 2 mins bc of your vid
@TJTHEFOOTBALLPROPHET
@TJTHEFOOTBALLPROPHET Жыл бұрын
Bruh, that was the best explanation on the internet! thank you!
@JackPlaysMinecraft575
@JackPlaysMinecraft575 7 ай бұрын
Thank you for this Helpful Video i was Struggling with using VScode Now i Know how to get python onto it
@lofgren007
@lofgren007 Ай бұрын
Best and simplest explanation I have come across for venv - thank you kindly.
@trzztrzz2477
@trzztrzz2477 11 ай бұрын
Life saver. Thank you man!
@LaminarRainbow
@LaminarRainbow 5 ай бұрын
Thank you for the quick and concise video!
@enableDeepak
@enableDeepak Жыл бұрын
quite helpful! what keyboard shortcut runs the program?
@guyonlead
@guyonlead Жыл бұрын
Quick and easy! Thanks!
@seandobson2682
@seandobson2682 18 күн бұрын
My VS code lets me use pip outside of a venv and when I look online it seems to be normal for pip to work outside a venv. Is there a reason why it should not be working like in the video? Im using windows.
@noekiriza5041
@noekiriza5041 Жыл бұрын
Thanks, I finally found the best Tutorial 💪
@bozok1903
@bozok1903 Жыл бұрын
I watch your videos even if I know the subject you teach. You are very good at transferring your knowledge. Thanks a lot.
@Ponduck
@Ponduck 9 ай бұрын
das just odd
@whatdaro
@whatdaro 9 ай бұрын
great video, straight to the point. subbed
@itskingshon
@itskingshon 3 ай бұрын
You're a literal lifesaver; thank you!
@danieledispirito
@danieledispirito Жыл бұрын
i’ve just discovered you’re italian, good video man!
@ispeakpython
@ispeakpython 4 ай бұрын
Thank you sir, I've found answer of my question here after 3 weeks.
@JATARKATAR123
@JATARKATAR123 2 ай бұрын
Thanks buddy for give me this instruction Thank you so much
@thetafritz9868
@thetafritz9868 4 ай бұрын
what do I do if I failed a couple times, tried again by deleting the .venv files and now no longer get the notification or the option to use the venv folder??
@pokpok9445
@pokpok9445 2 ай бұрын
I'm a bit late but you can click on the interpreter data on the bottom-right of the window that should be called like the version of python that is installed on your computer. Then you can click at the top on "browse..." then you go in the .venv folder then scripts and python.exe
@Malek_Kidmal
@Malek_Kidmal 10 ай бұрын
Thank you for this video, really helpful !
@alexeykruglov8185
@alexeykruglov8185 2 ай бұрын
Thank you vety much> I am using this in my work.
@anab6636
@anab6636 9 ай бұрын
if I made a file organizer code in python, but I'm scared to try it out on my actual computer, can I run it here??
@Nand_Snowwhite
@Nand_Snowwhite Жыл бұрын
Thanks for the beautiful explanaiton. Well done
@Youtube_Xtreme
@Youtube_Xtreme 5 ай бұрын
"tensorflow" is not importing, can Any one please help me
@datag1199
@datag1199 Жыл бұрын
Fantastic video. Thank you very much.
@gbvtech
@gbvtech 7 ай бұрын
why does the visual studio website says do not use the virtual environment same as a workspace folder? in your video you selected it as yes to use as a workspace folder
@nelsonberm3910
@nelsonberm3910 Жыл бұрын
This is freaking craZY Tthank yoiu
@solomonwest9104
@solomonwest9104 6 ай бұрын
You are very helpful ... you just earned a subscriber , Thanks
@catnpizza
@catnpizza Жыл бұрын
Thank you very much I'm very grateful!!!
@toddgilbey3979
@toddgilbey3979 10 ай бұрын
All these tutorials I'm seeing here have their directories on the Desktop, which I would imagine takes up a lot of room on your hard drive. I have set the Windows environment path to an Azure mounted storage as my repo and for some reason, despite following the instructions to the letter given by the VS website, I get the "django-admin" is not a recognized command yada yada yada...'. Why?
@ApolloAnalytics
@ApolloAnalytics Жыл бұрын
You saved my day... Thanks 😊
@user-vp1tk7fg6m
@user-vp1tk7fg6m 9 ай бұрын
thank you very much bro, it really helped me)
@Sanjana-nl1si
@Sanjana-nl1si 5 ай бұрын
Thank you. That was very helpful
@user-ys8uu5vd2f
@user-ys8uu5vd2f 4 ай бұрын
Thanks, this video is useful :)
@trp
@trp Жыл бұрын
Never thought it was this easy
@feelthevieww
@feelthevieww Жыл бұрын
it was so help full nice work bro
@anything9276
@anything9276 11 ай бұрын
That was very helpful thanks
@frankking5326
@frankking5326 7 ай бұрын
Amazing video!! Thanks
@Gamesoldier68
@Gamesoldier68 2 ай бұрын
Thank you very much for the very informative video. So i assume if you wanted to set up several virtual environments for different projects, you would just name them differently in the .venv command. Thanks again
@elektrokatzer
@elektrokatzer 3 ай бұрын
very helpful! Thanks!
@nimraiman2018
@nimraiman2018 3 ай бұрын
this is exactly what i was looking for❤
@schmeiser_
@schmeiser_ 3 ай бұрын
great video as always, btw I wanna ask why in my python, I cant import tkinter? it says " ModuleNotFoundError: No module named '_tkinter' "
@sbj6173
@sbj6173 Жыл бұрын
Thanks .that was great 😊
@y.s4963
@y.s4963 Жыл бұрын
First of all i love your accent and tnx for your tutorial
@user-yn8fj1rn5d
@user-yn8fj1rn5d 3 ай бұрын
short and clear😍
@aditg367
@aditg367 6 ай бұрын
Thank you for the video
@wicaksonoleksono7327
@wicaksonoleksono7327 6 ай бұрын
Why is my vscode only running 1 line of code inbased off my cursor, why i cant run all of them at once. i have to drag it then runnit, can you helpp? i used Conda env the 1st time then i used venv env . but its still do that. thank you
@wicaksonoleksono7327
@wicaksonoleksono7327 6 ай бұрын
hmm i dont want to debug, i just want to ran the code. can you fix that
@bassonette
@bassonette 5 күн бұрын
Is there a reason why the virtual environment folder is hidden ? I see other instructions where it is not
@cuoi123
@cuoi123 Жыл бұрын
Thank you, It to be great if you add resolve when user missing that pop-up^^
@PalmUniverse
@PalmUniverse 3 ай бұрын
Im trying to follow the tutorial step by step, but the modules still arent recognized by Pylance in the end.. No idea what im doing wrong
@joaovitor42411
@joaovitor42411 9 ай бұрын
Thank you very much, man
@ugurcaneser
@ugurcaneser 6 ай бұрын
It helped a lot. Thanks!
@Indently
@Indently 6 ай бұрын
Glad it helped!
@chycheaninh5346
@chycheaninh5346 2 ай бұрын
Thank you brother
@4tmadeit
@4tmadeit 10 ай бұрын
thank you man !
@imalkagunasekara8725
@imalkagunasekara8725 3 ай бұрын
Great
@DesperadoAH
@DesperadoAH 3 ай бұрын
THANK YOU ❣
@Matt-lf1ik
@Matt-lf1ik 5 ай бұрын
So are you supposed to have seperate venv folders for each project? Isnt that inecfficient as you would need multiple pip installations of the same basic things? Also would this work with git and uploading to github to work across multiple machines?
@AliBeats_
@AliBeats_ 4 ай бұрын
No, you can run multiple project from one virtual environment, 1- just use terminal to activate you're old virtual env from the old path. 2-don't forget two change the interpreter to the old virtual env, you can import anything using one venv. you just need to creat new venv when an library's update is needed so you don't corrupt your old project that are using old lib versions.
@ananyafrederick2524
@ananyafrederick2524 7 ай бұрын
hey if anyone could clear this doubt: what does the -m do?
@saremish
@saremish 7 ай бұрын
Very useful!
@tech-n-data
@tech-n-data 10 ай бұрын
If I had hair, I would have pulled it out trying to figure out why I code wasn't usin the venv. Thank you for this video.
@bneyez
@bneyez 11 ай бұрын
Ur the best!
@haiclop_music
@haiclop_music 7 ай бұрын
Thank you so much bro
@anomienormie8126
@anomienormie8126 9 ай бұрын
Idk what I've been struggling ten hours for when I could've just watched this and finished in 4minutes ㅠㅠㅠㅠ
@saintsscholars8231
@saintsscholars8231 6 ай бұрын
I was literally tearing my hair out trying to modify PATH variables and going around in circles. Very clear explanations. Thank you!
@user-jk1gb7wm6z
@user-jk1gb7wm6z Жыл бұрын
for windows .... python -m venv myenv Then activate it by following command... myenv\Scripts\activate here .... myenv is name of my environment .... u can give any name ..... Just 2 lines of Commands..
@Code4U_
@Code4U_ 2 ай бұрын
Forget a .\ and searching for how to fix ps1 error ...... Thanks ❤
@joncolt3915
@joncolt3915 6 ай бұрын
bro thank you so much!
@Indently
@Indently 6 ай бұрын
No problem!
@muralidharanrajendran4098
@muralidharanrajendran4098 Жыл бұрын
Big fan buddy ❤
@CodeOnBlocks
@CodeOnBlocks 10 ай бұрын
Thank you!
@MOHAMEDGHARBI100
@MOHAMEDGHARBI100 8 ай бұрын
your language is so beautiful, thank you for your time. may I ask you where you from?
@pleabargain
@pleabargain 7 ай бұрын
Super helpful. Thank you!
@Indently
@Indently 7 ай бұрын
Glad it was helpful!
@alemaonalingua
@alemaonalingua 6 ай бұрын
NIce. Thanks
@pedropacheco8532
@pedropacheco8532 7 ай бұрын
soooo hooot, thanks
@MetodNovak
@MetodNovak Жыл бұрын
can you make the same version for conda enviroment
@stephanieezat-panah7750
@stephanieezat-panah7750 11 ай бұрын
Why did you not run the source command? thank you
@AB-ko2mm
@AB-ko2mm 5 ай бұрын
Thank you
@JurajBatoska
@JurajBatoska 10 ай бұрын
Thanks !
@juliusngwu
@juliusngwu 7 ай бұрын
Crystal clear
Using The NEW GPT-4 Model To Create Cool Python Apps
12:54
Indently
Рет қаралды 102 М.
The Complete Guide to Python Virtual Environments!
15:52
teclado
Рет қаралды 335 М.
Хотите поиграть в такую?😄
00:16
МЯТНАЯ ФАНТА
Рет қаралды 3,6 МЛН
Каха и суп
00:39
К-Media
Рет қаралды 6 МЛН
100❤️
00:19
MY💝No War🤝
Рет қаралды 23 МЛН
5 Good Python Habits
17:35
Indently
Рет қаралды 442 М.
My Python Development Environment Setup - Full Tutorial
20:39
Tech With Tim
Рет қаралды 213 М.
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 280 М.
The most important Python script I ever wrote
19:58
John Watson Rooney
Рет қаралды 169 М.
Powerful VSCode Tips And Tricks For Python Development And Design
15:50
10 Nooby Mistakes Devs Often Make In Python
24:31
Indently
Рет қаралды 54 М.
I Solved 1583 Leetcode Questions  Here's What I Learned
20:37
ThePrimeTime
Рет қаралды 581 М.
Хотите поиграть в такую?😄
00:16
МЯТНАЯ ФАНТА
Рет қаралды 3,6 МЛН