Python Tutorial: VENV (Windows) - How to Use Virtual Environments with the Built-In venv Module

Поділитися
Вставка
  • Опубліковано 2 січ 2025

КОМЕНТАРІ • 529

  • @coreyms
    @coreyms  5 років тому +298

    In my older virtualenv video, I got a ton of requests to show how to use virtual environments on Windows. I hope this helps!

    • @Violet_Patrick
      @Violet_Patrick 5 років тому +3

      Hey Corey, thank you as always, i was trying to debug a Python for loop and was not sure if you talk about it anywhere. Also realized that sublime text 3 does not actually feature a python debugger, would appreciate your thoughts on this.

    • @guipa
      @guipa 5 років тому +2

      Thank you for all your videos. You should do one someday for pipenv!

    • @guipa
      @guipa 5 років тому +2

      And multiprocessing/multithreading

    • @guipa
      @guipa 5 років тому +1

      And sockets!

    • @coreyms
      @coreyms  5 років тому +3

      @@guipa I already have one for Pipenv. You can find that here: ua-cam.com/video/zDYL22QNiWk/v-deo.html

  • @matiasgomez9416
    @matiasgomez9416 5 років тому +368

    pip list > 2:13
    python -m venv project_env > 2:29
    project_env\Scripts\activate.bat > 3:24
    where python > 3:46
    pip install requests > 4:48
    pip install pytz > 5:00
    pip list >
    pip freeze > 5:47
    --> copy information 'pip freeze'
    --> create requirements.txt > 6:37
    --> paste information there
    deactivate > 7:16
    rmdir project_env /s > 7:33
    >> NEW PROJECT 8:48
    python -m venv my_project\venv > 8:55
    my_project\venv\Scripts\activate.bat
    pip install -r requirements.txt > 9:46
    cd my_project > 10:50
    --> create new file 'script.py'
    deactivate >
    rmdir venv /s >
    python -m venv venv --system-site-packages > 13:30
    venv\Scripts\activate.bat >
    pip list >
    pip install SQLAlchemy
    pip list --local

  • @Capt_X
    @Capt_X 5 років тому +58

    Corey...You are the Guru of python world..thanks a lot for sharing your knowledge as always!

  • @백영래-u3x
    @백영래-u3x 5 років тому +6

    Thank you for this tutorial! I couldn't figure out how to use VENV on my own, even though I read a book called " Test Driven Development" because the author explained how to use VENV on mac. Corey, you're the man!

  • @doneenhesse8153
    @doneenhesse8153 5 років тому +46

    This has been so helpful! My class focused mostly on programming, and so we didn't really understand what we were doing during setup, but your videos make it very clear and easy! Thank you!

  • @SamarHussain1
    @SamarHussain1 Рік тому +1

    This is the best venv tutorial that I've ever seen. Its bookmarked in my browser for over 1.5 years now. I get back to it whenever I miss something. Thanks man (y)

  • @kelvinokelvino783
    @kelvinokelvino783 3 роки тому

    i was totally confuse and frustrated just before completing the 17 minutes of this video
    honestly i feel really relief now..
    you got a new fan now man.....
    thank you...

  • @ife_jeremiah
    @ife_jeremiah 2 роки тому +11

    This is a simple and straight to the point tutorial. Well done man.
    You've just gotten a subscriber.

  • @takshvitweets
    @takshvitweets 5 років тому +13

    This is just perfect. I had been looking to understand venv for quite sometime now, and this clears it all. Great job!!!

  • @ajitkumar15
    @ajitkumar15 3 роки тому

    Thank you so much for resolving the issue. other videos on UA-cam wasted my time.

  • @micahjesse6580
    @micahjesse6580 2 роки тому +2

    This is the best video I've seen this year so far!!! I might be exaggerating but you sir have helped me solve a problem I was working on for the last 20+ hrs!

  • @hangfirers
    @hangfirers Рік тому

    Thank you so much! I’ve searched and read and tried everything on the net on how to set up venv but this is the only one that worked.

  • @ronilif
    @ronilif 3 роки тому

    Thank you Corey, I almost gave up trying to work with venv, until i saw this brilliant post...

  • @simonolofsson7488
    @simonolofsson7488 5 років тому +16

    This is exactly what I needed just now for my project which is rapidly growing in complexity. Thanks Corey!

  • @alex08585
    @alex08585 3 роки тому +1

    This video saved me in setting up venv in windows, still relevant in 2021

  • @bryanaguilar402
    @bryanaguilar402 4 роки тому +6

    This was great. I was thinking of questions as the video moved along and then you ended up answering them all. Great work Corey.

    • @tagifts
      @tagifts 3 роки тому

      He does that doesn't he. One of the most clear videos on venv.

  • @drissaitkassimusic
    @drissaitkassimusic 4 роки тому +2

    This guy is a real instructor. Great work a lot of effort there thank you

  • @donnie1581
    @donnie1581 4 роки тому +3

    jesus you don't know how much this helped me. All tutorials I've watched were done on Mac haha

  • @ItzSenaCrazy
    @ItzSenaCrazy 5 років тому +22

    I really needed this video.
    Thanks Corey!!

  • @ShahZ
    @ShahZ 4 роки тому +1

    Thanks @Corey Schafer. trying to follow some Django tutorial on UA-cam but just couldn't activate the virtual env, windows would accept the CMD but won't activate the venv :
    Setup: win 10, gitbash, python 3.7
    Create the venv: python -m venv my_dir
    Activate the venv: source my_dir/Scripts/activate
    Stackoverflow to the rescue. Love your work btw thanks from the rest of us.

  • @parthzala9426
    @parthzala9426 5 років тому +1

    Great tutorial! I am a hobbyist programmer, not an expert. I have been learning my self and this really helped.

  • @nigelemccoy1534
    @nigelemccoy1534 2 роки тому

    This guy is the GOAT, simple and easy tutorials! This helps alot!

  • @bobfreeedu
    @bobfreeedu 3 роки тому

    You are the best I have been like 2hour trying to figure it out , and with you it took like 1min

  • @JSRAumDhyanam
    @JSRAumDhyanam 4 роки тому

    Corey, I watched lot of videos about the environment and virtual environment but could not understand. Your explanations technique is the best. Thanks.

  • @rVnikov
    @rVnikov 5 років тому +5

    Yet another video from maestro Schafer that makes difficult subject looks pretty easy.
    Respect!

  • @AhmetAnilDindar
    @AhmetAnilDindar 5 років тому +4

    This is a very good video to learn venv module in short time. I appreciate your work.

  • @ayodele_great
    @ayodele_great 5 років тому +4

    Many thanks for this tutorial. You have saved me from what I spent a whole weekend trying to figure out.

  • @Virtualexist
    @Virtualexist 3 роки тому

    Best video to understand Virtual Environments Corey the messiah ! UwU

  • @X19-x5f
    @X19-x5f 5 років тому +1

    Pretty much what the rest of the comments say - great video and thanks once again!

  • @pipertripp
    @pipertripp 5 років тому +2

    Super helpful. Clear, concise, to the point. Thx much, m8.

  • @VEGETADTX
    @VEGETADTX 4 роки тому

    The single most important Python tutorial since Python's existence. Virtual environments are the most effective anti-hair loss treatment ever invented :)

  • @francisguchie1973
    @francisguchie1973 Рік тому +3

    This video is a simplified as a sip on a cup of coffee thank you so much Corey

  • @markettext
    @markettext 3 роки тому

    Good video, cleared a lot up. The programming is easier than the setup.

  • @mihaigrigore2136
    @mihaigrigore2136 5 років тому +4

    Thank you Corey for this excellent video on virtual environments. I needed it. You do not assume anything as known and this is very good, especially for beginners. For me, the best explanation on this topic I found!

  • @avivran1198
    @avivran1198 4 роки тому +1

    Very good one! Thank buddy. I like your videos. Your attitude and way of passing the stuff to your viewers is just excellent.

  • @shreyraval3284
    @shreyraval3284 4 роки тому

    Most simplest explanation there can ever be! 100000%

  • @thomaskirsch2209
    @thomaskirsch2209 3 роки тому +1

    Great videos Corey. You are the go to when I am looking to understand something python. Thanks for helping the community!

  • @onepercentdaily8772
    @onepercentdaily8772 Рік тому

    Even after 4 years, it is still a valid a video 😍

  • @bonnfranks5488
    @bonnfranks5488 4 роки тому

    My man...I've been struggling with this. Great video. Thank you so much.

  • @gburbano92
    @gburbano92 3 роки тому

    @ 3:34 my issue was solved thanks for the content!

  • @p.9227
    @p.9227 5 років тому +9

    This video really helps me a lot. Hope you'll make more videos like that.

  • @mjj2u2
    @mjj2u2 3 роки тому

    Great job. I found this very helpful.

  • @stardevilyn
    @stardevilyn 10 місяців тому

    This is very well explained and easy to follow. Thanks for the tutorial!

  • @soumyajitsarkar2372
    @soumyajitsarkar2372 4 роки тому

    This is the best video on the subject of python virtual environment! Thank You .

  • @pierrelesage1535
    @pierrelesage1535 3 роки тому

    Never found a more fitting video to my problem, thanks a lot!!

  • @salarghaffarian4914
    @salarghaffarian4914 4 роки тому

    You are the best instructor!

  • @cm_dev
    @cm_dev 3 роки тому

    Your videos are the best. Thanks for sharing your knowledge.

  • @pcbekri340
    @pcbekri340 Рік тому

    you are awesome i don't have words to describe how helpful this video was thanks alooot man

  • @louism.4980
    @louism.4980 11 місяців тому

    Thank you so much, love how simple and clear this tutorial is! :)

  • @kannanchandrasekaran3561
    @kannanchandrasekaran3561 5 років тому +6

    This is helpful Corey, comprehensive and good phase!

  • @pradhumnsharma5982
    @pradhumnsharma5982 3 роки тому

    Awesome and Easily understandable explaination.

  • @arthurfelde5437
    @arthurfelde5437 4 роки тому

    You are talking very fast, but you covered everything important to know. Many Thanks for that

  • @daniyarkaisan8387
    @daniyarkaisan8387 4 роки тому

    Thank you! That was the best explanation I encountered on UA-cam!

  • @Quaght
    @Quaght 3 роки тому

    This was so helpful and concise. Thank you very much from a Python (heck, programming in general) noob!

  • @financephofun7090
    @financephofun7090 2 роки тому

    Thank you for sharing! saves a ton of time, trying to search for solutions on your own

  • @scotttct
    @scotttct 3 роки тому

    Thanks Corey for creating this, I think every UA-cam turorial uses Mac, and I could not find a decent source for learning Virtual Environments...

  • @prateekupadhya1523
    @prateekupadhya1523 Рік тому

    Amazing tutorial - No one explains it like you do Corey!

  • @ZajoSTi
    @ZajoSTi 4 роки тому

    Best venv tutorial hands down. Thank you. Subscribed :)

  • @isagive
    @isagive 3 роки тому

    Thank you Corey, you actually explained away all the questions
    a noob like me came with. Things I just didn't understand and most videos
    skip, I guess cuz its obvious to the creator. Very helpful tutorial 🙏 thank u

  • @yash9089
    @yash9089 4 роки тому +1

    Thank you for this, you are the foundation of whatever i do or develop related to python

  • @Sonali_Dams
    @Sonali_Dams 3 роки тому

    Loved the solution finally my problem is solved.. bless you man.

  • @xsandwichxxsandwichx1778
    @xsandwichxxsandwichx1778 2 роки тому

    Thx Corey! This video is still helping me out in 2022

  • @sameerspl
    @sameerspl 5 років тому +1

    Awesome Man . You are awesome Corey . Thanks a ton . I love the way you make things simpler .

  • @averydrago
    @averydrago 4 роки тому +1

    Very helpful and you make it very intuitive, thank you!

  • @MosharofHossainZitu
    @MosharofHossainZitu 4 роки тому +1

    Thanks Corey Schafer, it was a very helpful tutorial!

  • @rafaelmrtnz
    @rafaelmrtnz Рік тому

    Thank you, that was really informative! Clears up questions.

  • @jackignatev
    @jackignatev 2 роки тому

    Incredibly useful! Big thanks for detailed description and instructions

  • @jake8217
    @jake8217 4 роки тому

    Man, you are just amazing. Very clear explanations. Saved me a lot of trouble.

  • @robertsampson4000
    @robertsampson4000 4 роки тому +1

    Great video. Really good explanation.

  • @MidoriToyota
    @MidoriToyota 4 роки тому

    Best tutorial for Virtual Environments!

  • @asoahmadzade4305
    @asoahmadzade4305 3 роки тому +1

    Excellent explanation

  • @astrostudent2302
    @astrostudent2302 4 роки тому

    Lovely voice, pace and control

  • @muuzabebe3365
    @muuzabebe3365 3 роки тому +1

    you are unique, keep it up !!!!!!!!!!!!!!!!!!!!!!!!!!

  • @ishanpand3y
    @ishanpand3y 4 роки тому

    Sir, you're just best.
    If anyone wants to automate the creation of requirements.txt file then just type in this:
    *pip3 freeze > requirements.txt*
    It will automatically save that.

  • @aliyanpops6424
    @aliyanpops6424 4 роки тому

    Thanks sir you're a blessing you're way of explanation is easy and interesting.

  • @cborrero2000
    @cborrero2000 2 роки тому

    Amazing and comprehensive video, Many thanks Corey.

  • @The231Flash
    @The231Flash 4 роки тому

    If I could like the video 10x I would, thanks bro

  • @st4willow
    @st4willow 5 років тому +1

    Thank you so much Corey for making these wonderful videos. They are all easy to understand and follow. I learn so much from them. I will join patreon to contribute to the group. Thank you for all you do!

    • @coreyms
      @coreyms  5 років тому

      Thanks! That’s a huge help!

  • @nicolasduque3871
    @nicolasduque3871 4 роки тому

    This video was great for me, I'm just learing python for the first time and as a windows user it was easy to follow the steps, congratulations. It would be great if you are able to add the english subtitles in the video because as me that I'm not an english person many other people could watch the video easer reading the subtitles

  • @chetansoni8620
    @chetansoni8620 4 роки тому +1

    Thanks a lot for sharing this informative information beautifully

  • @tymothylim6550
    @tymothylim6550 3 роки тому

    Thank you very much for this video :) It is very helpful and I learnt a lot!

  • @mistwire
    @mistwire 5 років тому +1

    Thanks for posting this, now I finally get how to use it in Windows :-)

  • @pready5082
    @pready5082 5 років тому +1

    Loved it! So detailed and clear

  • @photorealm
    @photorealm Місяць тому

    Excellent video, thanks for sharing this.

  • @jacobbell1503
    @jacobbell1503 3 роки тому

    Well done. Straight to the point.

  • @tullymars420
    @tullymars420 3 роки тому

    Fantastic video!! I am so grateful for this content!! I fell like I just made a leap in my coding journey!! Thank you so much!!!

  • @JohnJohn-bo2fo
    @JohnJohn-bo2fo 5 років тому +1

    Great video. With a lot of best practice tips, that we need to know. Thank you very much.

  • @devenadhikari
    @devenadhikari 4 роки тому +1

    very well explained...thanks...

  • @Vivian-ve1qt
    @Vivian-ve1qt 2 роки тому

    Very well explained. So grateful for these videos. 🙏

  • @mayanksinha509
    @mayanksinha509 2 роки тому

    thank you sir your video clear my lost of doubts

  • @larsalbrecht6964
    @larsalbrecht6964 5 років тому +1

    Very clear and super helpful, thanks a lot for this tutorial!

  • @youtubetv9851
    @youtubetv9851 5 років тому +2

    Thank you so much buddy,great tutorial many likesss!!!!!!

  • @Pharean
    @Pharean 4 роки тому +1

    Great video. Really helped me alot!

  • @gabrielenriquemartinezllan9224
    @gabrielenriquemartinezllan9224 4 роки тому

    What simply coll and useful video. Thank you very much.

  • @ZeroSkater45
    @ZeroSkater45 4 роки тому +2

    Very helpful. Thank you!

  • @arctic-1878
    @arctic-1878 4 роки тому +1

    Excellent tutorial, thank you! 😀

  • @maxwellnganyadi922
    @maxwellnganyadi922 4 роки тому

    This has cleared up so much for me! Thanks!

  • @victorv7364
    @victorv7364 5 років тому +1

    Thank you very much it was very useful

  • @chakirfri
    @chakirfri 3 роки тому

    great tutorial , may god bless you my friend

  • @AegirAexx
    @AegirAexx 4 роки тому

    Thank you Corey. All this virtual environment stuff was really confusing regarding how many of them there are. I'm going to stick with the baked in one, venv.