Тёмный

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

Indently
Подписаться 211 тыс.
Просмотров 352 тыс.
50% 1

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

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 200   
@rolandonunez1893
@rolandonunez1893 7 месяцев назад
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 6 месяцев назад
Goat
@lyndaraid3401
@lyndaraid3401 6 месяцев назад
Very useful comment 👍🏻
@artyCrafty4564
@artyCrafty4564 5 месяцев назад
thanxxxxxxxxx mannnnnnnnnnnnn
@Harshitha--wq1jq
@Harshitha--wq1jq 5 месяцев назад
thanks
@sushmitarawat6438
@sushmitarawat6438 5 месяцев назад
Thanks a ton😊
@NewParadigmAI-zm9lj
@NewParadigmAI-zm9lj 10 месяцев назад
This is the best damned instructional ever. Honestly, so many 20 minute videos, and this dude knocks it out of the park.
@zeebeat123
@zeebeat123 3 месяца назад
Couldn't agree more. I have watched SO many videos and they are much longer, and many leave out small but essential details
@joaquinurruti2628
@joaquinurruti2628 2 дня назад
Absolutely! He's so clear on every subject!
@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.😊
@ליאורשביט-ד5כ
@ליאורשביט-ד5כ 2 месяца назад
As someone who is just starting out and really needs the things that are understood by everyone, I appreciate this video. Thanks.
@boitedamour
@boitedamour 6 месяцев назад
after 4 hours of search, your tutorial saved my life . thanks
@abubakr9796
@abubakr9796 Год назад
Love your videos bro! Easy and simple to understand tutorials and explanations.
@abdullahattia2491
@abdullahattia2491 Год назад
simple enough and straight to the point thanks!
@azekhuoriadignity2360
@azekhuoriadignity2360 3 месяца назад
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 3 месяца назад
thank you, this was my issue, I was confused
@azekhuoriadignity2360
@azekhuoriadignity2360 3 месяца назад
@@Moxaji you’re welcome
@Ashley_Mariee
@Ashley_Mariee 3 дня назад
thank you so much for leaving this comment 🙌
@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!
@kenbajema
@kenbajema 9 месяцев назад
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.
@lofgren007
@lofgren007 3 месяца назад
Best and simplest explanation I have come across for venv - thank you kindly.
@andrewclayburn5920
@andrewclayburn5920 Год назад
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!
@charlessnachez4248
@charlessnachez4248 4 месяца назад
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?
@lavendercode
@lavendercode Год назад
Thank you so much Indently! This is the easiest way to make a virtual environment. Please continue to make videos; they are valuable!
@bensonkamau1844
@bensonkamau1844 Год назад
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
@reighndrop1
@reighndrop1 Месяц назад
I just keep getting an error when trying to run the virtual environment command- Python was not found; run without arguments to install from the Microsoft Store,
@llucgarciacrumols4330
@llucgarciacrumols4330 20 дней назад
me too, have you fixed it?
@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..
@sgomez8194
@sgomez8194 Месяц назад
thank you! .venv\Scripts\activate did it for me! now i can see the (.venv) in the terminal
@ispeakpython
@ispeakpython 7 месяцев назад
Thank you sir, I've found answer of my question here after 3 weeks.
@itskingshon
@itskingshon 5 месяцев назад
You're a literal lifesaver; thank you!
@JackPlaysMinecraft575
@JackPlaysMinecraft575 9 месяцев назад
Thank you for this Helpful Video i was Struggling with using VScode Now i Know how to get python onto it
@LaminarRainbow
@LaminarRainbow 7 месяцев назад
Thank you for the quick and concise video!
@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!
@mohammadhseinanvari5865
@mohammadhseinanvari5865 Месяц назад
Thank you so much this video was so practical for me❤❤❤❤
@bodonyigy
@bodonyigy 9 месяцев назад
Helped a lot. Simple, clear, understandable!
@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 Год назад
das just odd
@saintsscholars8231
@saintsscholars8231 8 месяцев назад
I was literally tearing my hair out trying to modify PATH variables and going around in circles. Very clear explanations. Thank you!
@cpesk06
@cpesk06 27 дней назад
Thanks!! Can you replace .venv with another environment name, or is this necessary for it to run properly?
@cosmic_9
@cosmic_9 10 месяцев назад
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.
@PagareProduction123
@PagareProduction123 4 месяца назад
Thanks buddy for give me this instruction Thank you so much
@solomonwest9104
@solomonwest9104 8 месяцев назад
You are very helpful ... you just earned a subscriber , Thanks
@Gamesoldier68
@Gamesoldier68 4 месяца назад
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
@sharifsharifani
@sharifsharifani Год назад
Although I completely followed this video, the error resists:ImportError: No module named statistics what should I do?
@srivatsavm3892
@srivatsavm3892 Год назад
i know this is a late reply cuz i just saw it but, after creating virtual environment you have to install your packages again using pip install
@Virtual4087
@Virtual4087 8 месяцев назад
​@@srivatsavm3892 Do we need to install all the packages that are already installed in our system again when we activate a virtual environment?
@riluwan369
@riluwan369 6 месяцев назад
bruhh ig its inbuilt
@rick.d
@rick.d Год назад
couldn't have been more perfect. thanks!
@whatdaro
@whatdaro 11 месяцев назад
great video, straight to the point. subbed
@nimraiman2018
@nimraiman2018 5 месяцев назад
this is exactly what i was looking for❤
@seandobson2682
@seandobson2682 2 месяца назад
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.
@MushroomPower84
@MushroomPower84 Год назад
Thank you for your work! I've already learned a lot by this channel.
@ivosacagami121
@ivosacagami121 5 месяцев назад
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
@KALYDO
@KALYDO 14 дней назад
very helpful
@trzztrzz2477
@trzztrzz2477 Год назад
Life saver. Thank you man!
@al.habibii
@al.habibii 5 месяцев назад
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..
@noekiriza5041
@noekiriza5041 Год назад
Thanks, I finally found the best Tutorial 💪
@y.s4963
@y.s4963 Год назад
First of all i love your accent and tnx for your tutorial
@katerinaprotivenskiy3680
@katerinaprotivenskiy3680 7 месяцев назад
Very helpful! thanks!
@schmeiser_
@schmeiser_ 6 месяцев назад
great video as always, btw I wanna ask why in my python, I cant import tkinter? it says " ModuleNotFoundError: No module named '_tkinter' "
@Malek_Kidmal
@Malek_Kidmal Год назад
Thank you for this video, really helpful !
@danieledispirito
@danieledispirito Год назад
i’ve just discovered you’re italian, good video man!
@julianpicon243
@julianpicon243 6 месяцев назад
Great
@pleabargain
@pleabargain 9 месяцев назад
Super helpful. Thank you!
@Indently
@Indently 9 месяцев назад
Glad it was helpful!
@Nand_Snowwhite
@Nand_Snowwhite Год назад
Thanks for the beautiful explanaiton. Well done
@Code4U_
@Code4U_ 4 месяца назад
Forget a .\ and searching for how to fix ps1 error ...... Thanks ❤
@GouravRout10
@GouravRout10 2 дня назад
lovely
@nelsonberm3910
@nelsonberm3910 Год назад
This is freaking craZY Tthank yoiu
@Dasol0246
@Dasol0246 9 месяцев назад
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?
@chycheaninh5346
@chycheaninh5346 5 месяцев назад
Thank you brother
@MOHAMEDGHARBI100
@MOHAMEDGHARBI100 10 месяцев назад
your language is so beautiful, thank you for your time. may I ask you where you from?
@frankking5326
@frankking5326 9 месяцев назад
Amazing video!! Thanks
@DesperadoAH
@DesperadoAH 5 месяцев назад
THANK YOU ❣
@guyonlead
@guyonlead Год назад
Quick and easy! Thanks!
@ХумоюнХужаев
@ХумоюнХужаев Год назад
thank you very much bro, it really helped me)
@datag1199
@datag1199 Год назад
Fantastic video. Thank you very much.
@gbvtech
@gbvtech 9 месяцев назад
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
@ApolloAnalytics
@ApolloAnalytics Год назад
You saved my day... Thanks 😊
@tonyhacker932
@tonyhacker932 2 месяца назад
thanks brother
@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
@bassonette
@bassonette 2 месяца назад
Is there a reason why the virtual environment folder is hidden ? I see other instructions where it is not
@feelthevieww
@feelthevieww Год назад
it was so help full nice work bro
@ugurcaneser
@ugurcaneser 8 месяцев назад
It helped a lot. Thanks!
@Indently
@Indently 8 месяцев назад
Glad it helped!
@MukhammadkodirAbdusalomov
@MukhammadkodirAbdusalomov 6 месяцев назад
Thanks, this video is useful :)
@aditg367
@aditg367 8 месяцев назад
Thank you for the video
@En1gma2u
@En1gma2u 11 месяцев назад
Thank You!!, I knew I recognized the voice -- Total Python: You Can Master Python Programming in 16 Days
@Indently
@Indently 11 месяцев назад
What’s that?
@En1gma2u
@En1gma2u 11 месяцев назад
A class on Udemy, guy name is Federico and sounds just like you.
@PalmUniverse
@PalmUniverse 6 месяцев назад
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
@cuoi123
@cuoi123 Год назад
Thank you, It to be great if you add resolve when user missing that pop-up^^
@wicaksonoleksono7327
@wicaksonoleksono7327 8 месяцев назад
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 8 месяцев назад
hmm i dont want to debug, i just want to ran the code. can you fix that
@trp
@trp Год назад
Never thought it was this easy
@Matt-lf1ik
@Matt-lf1ik 7 месяцев назад
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_ 7 месяцев назад
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.
@davidegtheuseless
@davidegtheuseless Месяц назад
Are you italian by chance? cuz I saw "cartella senza nome" on your desktop
@saremish
@saremish 9 месяцев назад
Very useful!
@thetafritz9868
@thetafritz9868 7 месяцев назад
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 5 месяцев назад
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
@KumR
@KumR Месяц назад
Thanks lets say all this is done and program closed . What should be done when I want to reopen and go back to same env ?
@enableDeepak
@enableDeepak Год назад
quite helpful! what keyboard shortcut runs the program?
@Youtube_Xtreme
@Youtube_Xtreme 7 месяцев назад
"tensorflow" is not importing, can Any one please help me
@RoseHaft
@RoseHaft 17 дней назад
What if we do not get that pop-up? I am not convinced I have launched a virtual environment. Any advice for this code from Coursera? if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi pipenv shell pipenv install
@AB-ko2mm
@AB-ko2mm 8 месяцев назад
Thank you
@joaovitor42411
@joaovitor42411 11 месяцев назад
Thank you very much, man
@anab6636
@anab6636 11 месяцев назад
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??
@techsporadic
@techsporadic 8 месяцев назад
Thanks
@anything9276
@anything9276 Год назад
That was very helpful thanks
@haiclop_music
@haiclop_music 9 месяцев назад
Thank you so much bro
@bneyez
@bneyez Год назад
Ur the best!
@alemaonalingua
@alemaonalingua 8 месяцев назад
NIce. Thanks
@sbj6173
@sbj6173 Год назад
Thanks .that was great 😊
@catnpizza
@catnpizza Год назад
Thank you very much I'm very grateful!!!
@ananyafrederick2524
@ananyafrederick2524 10 месяцев назад
hey if anyone could clear this doubt: what does the -m do?
@saipoojithanamani054
@saipoojithanamani054 Месяц назад
I keep getting error - python was not found,run without arguments what is mean by that?? Could you solve it??😢
@joncolt3915
@joncolt3915 9 месяцев назад
bro thank you so much!
@Indently
@Indently 9 месяцев назад
No problem!
@tech-n-data
@tech-n-data Год назад
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.
@4tmadeit
@4tmadeit Год назад
thank you man !
Далее
Using The NEW GPT-4 Model To Create Cool Python Apps
12:54
The Complete Guide to Python Virtual Environments!
15:52
5 Good Python Habits
17:35
Просмотров 539 тыс.
Best way to create a virtual environment IN vscode
6:14
5 Useful F-String Tricks In Python
10:02
Просмотров 308 тыс.
Virtual Environments in Python - Crash Course
13:33
Просмотров 94 тыс.
How to Set up VS Code for Data Science & AI
22:53
Просмотров 310 тыс.