How to Install and Run Multiple Python Versions on Windows 10/11 | pyenv & virtualenv Setup Tutorial

Поділитися
Вставка
  • Опубліковано 31 лип 2024
  • This video will show you how to install and run different Python versions on Windows 10/11 using pyenv. You will learn to seamlessly switch between multiple Python versions and set specific Python versions for dedicated folders. Additionally, we will set up virtual environments (virtualenv) for your Python projects and use them in Visual Studio Code.
    ⏬ Get my FREE Python Cheat Sheets: k0nze.gumroad.com
    🖥️ pyenv-win GitHub Repo: github.com/pyenv-win/pyenv-win
    👉 Website for this Video: k0nze.dev/posts/install-pyenv...
    💌 Support me on Patreon: / k0nze
    ☕️ Buy me Coffee: www.buymeacoffee.com/k0nze
    🌍 Check out my Website: k0nze.dev
    💻 Join our Discord: discord.k0nze.dev
    👔 Follow me on LinkedIn: linkedin.k0nze.dev
    Recording Gear
    Camera - Sony A6400: geni.us/zRw1
    Lens - Viltrox AF 23mm f1.4: geni.us/RVrguGd
    Microphone - Rode Wireless Go: geni.us/RBAOIx
    Keyboard - Keychron K2 v2: geni.us/DPK87Xn
    ⏰ Timestamps:
    0:00 Intro
    0:55 Install pyenv on Windows 10/11
    4:54 Install Python through pyenv
    5:57 Set a specific Python version in a PowerShell
    6:34 Set global Python version with pyenv
    6:58 Install latest Python release candidate with pyenv
    7:36 Set a specific Python version for a project
    8:26 Using Python virtual environments with pyenv
    9:59 Use Python virtual environments in VSCode
    12:02 Outro

КОМЕНТАРІ • 186

  • @k0nze_builds
    @k0nze_builds  2 роки тому +3

    Download FREE Python Cheat Sheets: k0nze.gumroad.com

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

    Thank you tremendously for this video--you beautifully outlined or "colored-in" what was missing from the GitHub docs to run versions and even virtual environment with VS Code. Brilliant. Thank you. 🙂

  • @339justdoit
    @339justdoit 2 роки тому +7

    Probably one of the best tutorial videos i've seen, thank you!!

  • @mrunalbavkar7788
    @mrunalbavkar7788 5 місяців тому

    Hey there! massive thanks for this tutorial! Seriously, it's hands down one of the best I've come across. Your explanations were super clear, and those ready-made commands? Genius move! Saved me a ton of time and hassle, so cheers for that. Keep up the awesome work, and I'll definitely be keeping an eye out for more of your tutorials

  • @NetPwn
    @NetPwn 2 роки тому +8

    Just under 5 minutes in and already an absolutely perfect tutorial, great work!

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

      Thank you, I'm happy you like the video!

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

    Thank you! I couldn't follow other vids but yours was the one.

  • @jacobhuss6623
    @jacobhuss6623 2 роки тому +9

    This is an incredible tutorial. It's straight to the point and tells you everything you need to know to get started. Thank you!

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

    after multiple iterations, it took me this one video to get it right. thank you!

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

    I can't thank you enough Sir. This is just what I wanted to solve my problem. Also, got to know about pyenv and I'll use it now onward.

  • @KarlFonacier
    @KarlFonacier 3 місяці тому

    Thanks mate. Very informative and easy to follow. Good Job!

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

    This was completely necessary for someone like me running full time linux and having to work sometimes on windows with no idea how to even "cd" or "ls -l" on windows. Thank god the powershell has those commands.

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

    This is very helpful and straight forward! Thank you for your effort on this video!

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

    You are such an excellent Python master. Awesome job solving this really important topic

  • @TheMalni
    @TheMalni 5 місяців тому

    Wow, thank you so much for the step by step explanation, it was really helpful!

  • @alessandrolazzaro4996
    @alessandrolazzaro4996 5 місяців тому +1

    thank you. this quick tutorial is very useful - it saved my day indeed - your voice is understandable and clear - which is not so obvious nowadays.

    • @k0nze_builds
      @k0nze_builds  5 місяців тому

      Thank you, for your comment. You made my day!

  • @deivisonribeiro489
    @deivisonribeiro489 2 місяці тому

    Thank you so much K0nze!!
    This tutorial is the best about pyenv in youtube!!!
    You saved my life a lot of times.
    The first time I watched it was in 2022 and today you helped me again !!
    God bless you so much !!!

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

    Best video on virtual_env on windows! keep it up, dude!

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

    Big thumbs up to you. This is amazing. Thanks for making the video

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

    Appreciate the video! Very informative!

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

    THANK YOU for a great video. HUGE FAN! Liked and Subscribed!

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

    Excellent tutorial! Thank you so much

  • @levdoescode
    @levdoescode 9 місяців тому

    Good video. I was finally able to get this running

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

    Best tutorial (trust me I have gone through a lot and this is the only one that works)

  • @ayushporwal5950
    @ayushporwal5950 Рік тому +2

    for people whose "python -V" is showing old version after pyenv shell NEW_PYTHON_VERSION, head over to search bar and type "Manage app execution aliases" and untoggle all the python related thing, check if the command works now in a new terminal, if not then you have to uninstall all the previous instances of python installed from control panel while having already done the first step above. It should solve the issue. Enjoy folks!! Nice video dude

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

    Thank you so much man you made it look easier!!!!!!❤❤

  • @sorintatah2413
    @sorintatah2413 2 роки тому +5

    Thank you so much. This is exactly what I needed. Very easy and straight to the point.

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

      I'm happy I could help you set pyenv up on your system.

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

    Very helpful tutorial. Now my device able to run multiple versions of python. 👍🏽

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

    Thank you so much. It was really really helpful.😃

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

      I'm glad the video was helpful for you Priyanka!

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

    Very helpful. Thank you very much!

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

    Great video!! thanks!! greetings from Cuba!

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

    Really awesome, thank you! Unfortunately am using Git Bash and have to switch to power shell beside that it is perfect.

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

    Best VENV video out there

  • @UndrakhBadarch
    @UndrakhBadarch 4 місяці тому

    Thank you very much, was really helpful

  • @TrevorR_333
    @TrevorR_333 4 місяці тому

    This saved my rear, thanks a bunch.

  • @brettbosserman3639
    @brettbosserman3639 11 місяців тому

    You can tell this video is good because I have a room temp IQ and I was able to understand this. Well done.

  • @josecuevas5814
    @josecuevas5814 2 роки тому +3

    Thank you for this great tutorial! Very clear and usefull! :) I am currently working in my master disertation in engineering and I need a way to switch between python versions in a easy way!

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

      I'm happy I could help you out with this video Jose! A wish you all the best with your master's thesis project.

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

    GREAT ! Thanks a lot !

  • @diogodias_
    @diogodias_ 8 місяців тому

    thanks for this video. really save my beeware android project.

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

    You're a monster, really nice video

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

    Maan you are soo good!

  • @KingQuetzal
    @KingQuetzal 7 місяців тому

    So good. Thank you

  • @obatochukwu2675
    @obatochukwu2675 2 роки тому +5

    Using the the command pyenv shell 3.7.9 does not change the python version to 3.7.9 rather gives me my default system python version

  • @user-lz1qm7zn3l
    @user-lz1qm7zn3l Рік тому

    Great video, this has helped me alot. This is something I have struggled with for a while.
    The only question I have is around installing python packages/modules in the virtual environment such as numpy, scikit, matplotlib etc.
    Would this be as simple as using pip while in the virtual environment? Are these installed packages persistent when the environment is deactivated and activated again? If not is there a way to have these as a present to be installed every time the venv is activated?

  • @OlaffiDzn
    @OlaffiDzn 3 місяці тому

    your video saved me

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

    very good, thanks

  • @roberteagly3349
    @roberteagly3349 9 місяців тому

    Amazing instruction video. Is it possible that you could list out the steps that are 1 time and which steps are to be repeated each time a new virtual environment is needed?

  • @gautamdawar5067
    @gautamdawar5067 2 роки тому +1

    Thank you Sir!

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

    Clear and well made video. Thank you !

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

      I'm happy the video was helpful for you.

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

    would you use wsl for python development on windows if you are collaborating with other people on different os?

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

    Thanks for the nice video. One question though: VS code does not recognize the .venv automatically for me, also not after creating settings.json and/or launch.json. I have to select it manually. Are there prerequisites for VS Code to select the .venv automatically?

  • @jeppe7328
    @jeppe7328 5 місяців тому

    THANK YOU

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

    Really Thanks :,,V

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

    Thank you for the video. How do see the list of the different virtual environments installed in the system. Can something like pyenv plugin like pyenv- virtualenv or similar be used.

  • @soheil9248
    @soheil9248 2 роки тому +6

    Thank you!
    I got a problem though,
    I followed the instructions but when I entered "python -V" it just returned the current python version on my system which is 3.10.1, while I installed and activated the 3.8.2 in pyenv;
    Can u help me out with this issue?

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

      same with me

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

      Mines as well

    • @ItsMe-yr6pj
      @ItsMe-yr6pj Рік тому +4

      I fixed it by removing the old python path from the system environment.

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

      @@ItsMe-yr6pj Thank you !! this helped me as well!

  • @yuiofastora
    @yuiofastora 2 роки тому +1

    Thank U! I've searched a lot for such a wonderful solution

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

      I'm happy I could you with a solution to your problem!

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

    Thank you

  • @Orange-qc6ub
    @Orange-qc6ub 2 роки тому

    I'm having issues with an error specified as 'The system cannot execute the specified program'. This happens when I try to run 'pyenv install -l. Is there any way you can help?

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

    THank you so much, does this mean i can select the pyenv as an interpreter in pycharm?

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

    This is a good video and Thanks a lot for sharing this tutorial. But I have a question After we set python 3.10 to the local folder "Python Test" and how to delete that python 3.10 on local?

  • @YorukaValorant
    @YorukaValorant 2 роки тому +1

    Thanks!

  • @pocketsoroka
    @pocketsoroka 2 роки тому +3

    Thank you very much. Everything is explained very simply and easily

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

      I'm happy the video was helpful for you!

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

    Sir, I'm having a problem with python-openssl with Ubuntu 22.04. How to fix?

  • @Hughahugha361
    @Hughahugha361 2 місяці тому

    Super hilfreiches Video!
    Der Teil mit settings.json ist wohl nicht mehr nötig, das macht VSCode mitlerweile automatisch. Allerdings zeigt es im Terminal nicht an, dass man in einer (.venv)ist.
    Super praktisch und als Anfänger konnte ich jetzt einen simplen pyemv-installer machen, der mir automatisch ein passendes Environment zu meinem Projekt aufsetzt 😊

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

    what if I want to change the version of python in vscode? What shell I do?

  • @norbxert
    @norbxert 2 роки тому +1

    Thank you! That was really helpful!

    • @k0nze_builds
      @k0nze_builds  2 роки тому +1

      I'm happy I could provide you helpful content

  • @yanischamplin1553
    @yanischamplin1553 2 роки тому +1

    Thanks for the guide, well made!

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

      I'm happy the video was helpful for you Yanis!

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

    Thanks man you fix my problem, th think is that the CurrentUser ExecutionPolicy have to be unrestricted, for me, before the installation work.

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

    How can i disable temporarily this and use the python installed on the system instead?

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

    Do we need to install 1 version of python to path so we can install pyenv?

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

    I keep getting "Unable to locate package python-openssl" error when trying to run the pyenv dependencies

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

    you are the best

  • @ericcrossley4059
    @ericcrossley4059 5 місяців тому

    ok so what do I do if I get to pyenv shell, and when i do python -v i get a huge amount of text back - presumably because i have system python on windows that is 3.10 ... i'm trying to do all this so i can run a thing that needs python 3.8

  • @FVT-tn8ji
    @FVT-tn8ji Рік тому

    thanks

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

    Super

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

    Is running the command-prompt as admin the same as using powershell?
    What happens if you already have multiple python versions already installed, before you've installed pyenv?
    I sometimes have to run a windows setup exe or a whl to install a specific python package.. (for example PyQt 5.4 can't be installed via pip), how would this work with pyenv/virtualenv?
    I'm actually only interested in building EXEs from 2 python versions.. Python 3.4.4 (32-bit for WinXP) and Python 3.11.1 (64-bit). Would it be easier in my case to just change the PATH whenever I want to switch between? What would pyenv/venv add?

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

    thank you! But what if I haven't admin rights?

  • @shayryan8501
    @shayryan8501 2 роки тому +1

    This is a great tutorial on pyenv, thanks very much.

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

      Thank you! I'm glad you enjoyed the video Shay!

  • @user-tc1vy3zf4b
    @user-tc1vy3zf4b Рік тому

    Лучший 👍

  • @jesuscalixto9675
    @jesuscalixto9675 2 роки тому +1

    Very good and well instructive, thank you very much.

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

      I'm happy you enjoyed the video and that it was helpful for you Jesus!

  • @TiMaclife
    @TiMaclife 5 місяців тому

    :v thank you thank you very much

  • @helplearnhome9542
    @helplearnhome9542 2 роки тому +1

    this was awesome! i leant a lot!!

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

      I'm happy the video was helpful for you and that you learned some new things!

  • @dannya3248
    @dannya3248 Рік тому +4

    I had the problem that I installed the 3.10.8 version in pyenv, but python -V showed me the 3.11.1 version which I had installed directly in my pc. Solved the problem by uninstalling 3.11.1 and installing it in pyenv. Hope it helps someone who has had the same problem

  • @unknownuser3000
    @unknownuser3000 7 місяців тому

    Thanks, i want to try this because my python 3.10.6 wont download tts from python as a requirement and believe i need 3.9 or lower. I was hoping i could just install a second copy as creating the pyenv and stuff im not sure how thatmworks with oogabooga so i dont lose stabls diffusion python

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

    Is it really safe to set Set-ExecutionPolicy unrestricted?

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

    What is the purpose of the launch JSON (at 11:20)?

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

    Using the the command pyenv shell 3.8.6 does not change the python version to 3.8.6 rather gives me my default system python version...how to fix this

  • @ChrisSaur
    @ChrisSaur 8 місяців тому

    I installed 3.10.6 with the "penv install 3.10.6" but every time i try to swap to it or set it as global it shows me that i am on 3.9.12 afterwards. Is there a way to tell what I did wrong?
    I want to use python 3.10.6 for Stable diffusion while using a newer version of python for the rest of my system. Is this even the correct way to achieve that? I am here because I tried to install 2 python versions on WIn 10 and while installing python 3.10.6 it just told me that there is already a python verison on my pc so i cant install another. :(

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

    What's the hardware minimum requirements for?

  • @gauravchandragoswami4144
    @gauravchandragoswami4144 3 місяці тому

    11:30 I can't find "Module Debug a python file by invoking it with '-m'"

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

    The term 'pyenv' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    the spelling of the name, or if a path was included, verify that the path is correct and try again.
    4:10

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

    I already have python 3.11 and did not work for me. In pyenv I see 3.9.6 but normally '> python -v' returns 3.11.0 by the way it was really good

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

    how can i undo global version?

  • @ahmedalshamsi6124
    @ahmedalshamsi6124 2 роки тому +1

    welldone job

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

      Thank you Ahmed! I'm happy you liked the video!

  • @prateeksarangi9187
    @prateeksarangi9187 2 роки тому +1

    Thanks mate really helpful

    • @k0nze_builds
      @k0nze_builds  2 роки тому +1

      I'm happy the video was helpful for you Prateek!

  • @aryanmalewar7789
    @aryanmalewar7789 8 місяців тому

    Hey konze, I have installed 3.10.11 then created a venv. 'pyenv version' gives 3.10.11 but 'python -V' gives output 3.9.7
    i tried pyenv global 3.10.11, still python -v is 3.9.7
    Can you help with why is this happening?

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

    I get this error> pyenv : The term 'pyenv' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    the spelling of the name, or if a path was included, verify that the path is correct and try again. And I did exactly what he said in the video. I have windows 11.

  • @preuttipuawade9402
    @preuttipuawade9402 2 роки тому +1

    Thank you a lot. this is very easy and clearly explained vdo. Thank again.

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

      I'm happy this video was helpful for you Preutti!

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

    I was with you until 'pyenv shell #' didn't actually change the output of "python -V". '"python local" made the version file but the -V isn't changing.

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

      Check with get-command maybe you have another version of python that is also in the PATH that is picked up instead

  • @cybersamurai99
    @cybersamurai99 2 роки тому +1

    it worked like a charm friend :)

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

      I'm happy that it worked out great for you!

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

    can you please add a video on how to use python Poetry