How to Install and Run Multiple Python Versions on macOS | pyenv & virtualenv Setup Tutorial

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 108

  • @k0nze_builds
    @k0nze_builds  2 года назад +2

    Download FREE Python Cheat Sheets: k0nze.gumroad.com

  • @muhammadhummayunyousaf6579
    @muhammadhummayunyousaf6579 2 года назад +9

    I spent 6 hours finding the solution. Then, I found your video. Thank buddy

    • @k0nze_builds
      @k0nze_builds  2 года назад

      I'm glad the video was helpful for you and that you could fix your problem!

  • @timothygrupp
    @timothygrupp 12 дней назад

    Brilliant. Thanks so much. Clear, concise, correct!

  • @ianjeffries7972
    @ianjeffries7972 6 месяцев назад

    Virtual environments and different python versions were the bane of my existence until this video. Thanks mate!

  • @nelsonfleig5024
    @nelsonfleig5024 3 месяца назад

    Super helpful video! Was looking for something similar to NVM for Python and this fit the bill perfectly!

  • @mistersquid
    @mistersquid 8 месяцев назад

    Thank you for your clear explanation of how to manage python versions. First rate.

  • @HannahRobinsonNZ
    @HannahRobinsonNZ 5 месяцев назад

    Thank you so much for this brilliant video and the helpful blog post! It is by far the clearest and most complete explanation I've found.

  • @richardrandolph9794
    @richardrandolph9794 2 месяца назад

    Thanks for the great video. I have this running on macOS, Win11, and Mint Linux!

  • @BlancoYT
    @BlancoYT Год назад +1

    Very well explained I wish I found this when I needed it 4 months ago :(

  • @maheshmagalage1886
    @maheshmagalage1886 2 года назад +2

    This is golden! Thank you!

    • @k0nze_builds
      @k0nze_builds  2 года назад

      I'm happy I could help you out Mahesh!

  • @parhamfa
    @parhamfa 2 года назад +5

    I get "BUILD FAILED (OS X 12.3 using python-build 20180424)" error with any version of 3.6.x to 3.9.x

  • @marrufomcbo
    @marrufomcbo 2 года назад

    thanks! very detailed and helpful! you got yourself a new follower today

  • @merc1er
    @merc1er 2 года назад +2

    High quality video, thank you!

    • @k0nze_builds
      @k0nze_builds  2 года назад

      I'm glad the you enjoyed the video and it was helpful for you Corentin!

  • @zhuweivideo
    @zhuweivideo 3 года назад +3

    Great! that is exactly what I need

    • @k0nze_builds
      @k0nze_builds  3 года назад +1

      I'm happy the video was helpful for you!

  • @iamsumanghosh
    @iamsumanghosh Месяц назад

    Thanks a ton for this video.

  • @bls512
    @bls512 2 года назад +1

    Thanks for this! Nice website :)

  • @sachuynhvan385
    @sachuynhvan385 2 года назад +1

    Excellent! Thanks for your video

    • @k0nze_builds
      @k0nze_builds  2 года назад

      I'm happy the video was helpful for you!

  • @bbrendon
    @bbrendon Год назад

    Whoa! No downvotes? Well done!

  • @juliensallerin4641
    @juliensallerin4641 2 года назад +2

    Great ressource , thanks

    • @k0nze_builds
      @k0nze_builds  2 года назад

      I'm glad it was helpful for you Julien!

    • @seraphimwang
      @seraphimwang 2 года назад

      Humongous thanks 🙏🏻!

  • @talhaahmed-nb7tk
    @talhaahmed-nb7tk Год назад

    It was really helpful. well explained as well.

  • @thecodechapter
    @thecodechapter Год назад

    You were really helpful. Thanks :)

  • @fayyaznaeem5241
    @fayyaznaeem5241 2 года назад +1

    Excellent! Thank you :)

  • @surajmatta9204
    @surajmatta9204 Год назад +1

    Tried to installed 3.7.2. getting this Error
    BUILD FAILED (OS X 12.6 using python-build 2.3.5-16-ge0311823)
    Inspect or clean up the working tree at /var/folders/gn/2tnktwvs1pjbqrg5_mshr1680000gn/T/python-build.20221101133007.5853
    Results logged to /var/folders/gn/2tnktwvs1pjbqrg5_mshr1680000gn/T/python-build.20221101133007.5853.log

  • @alwayserik
    @alwayserik 2 года назад +2

    Why didn't we use pyenv-virtualenv?

  • @ederarmandoanillolora3048
    @ederarmandoanillolora3048 8 месяцев назад

    Good video. Absolutely awesome!

  • @ilushasm
    @ilushasm Год назад +1

    Hello, K0onze
    After following your video step by step and installing python with pyenv i got following error in python console in pycharm: "pydev debugger: CRITICAL WARNING: This version of python seems to be incorrectly compiled (internal generated filenames are not absolute)"
    how can i fix it?

  • @mgh9271
    @mgh9271 Год назад

    Very well explained.

  • @user-im2do3vq8p
    @user-im2do3vq8p Год назад

    Hi @k0nze, thanks for the great content. Is is very helpful

  • @yasin2210
    @yasin2210 5 месяцев назад

    you are awesome man!!

  • @darkredtulip
    @darkredtulip Год назад +2

    Hi k0nze, thank you so much for this video, it is so helpful! At 5:08 you mention the pyenv global code, for some reason this doesn't work for me. If I enter pyenv versions, my chosen python version shows, but as soon as I use the global code and open a new terminal, it doesn't show my chosen python version. Do you know why?

  • @roberthmejias
    @roberthmejias 2 года назад +1

    Thanks a lot!!! you're awesome

    • @k0nze_builds
      @k0nze_builds  2 года назад

      Thank you Roberth! I'm happy it was helpful for you

  • @TamLeAuthentic
    @TamLeAuthentic 9 дней назад

    Thank you!

  • @jpablomayorga
    @jpablomayorga 2 года назад

    Gracias excelemte video, me acabas de salvar y ahorrarme futuros dolores de cabeza

  • @SpencerDavis2000
    @SpencerDavis2000 2 года назад

    great clear tutorial thanks

  • @IbrahimKaleel-jp4el
    @IbrahimKaleel-jp4el 3 месяца назад

    @k0nze_builds, what is the purpose of this command -> "xcode-select --install"

  • @fayax
    @fayax Год назад

    Excellent!!

  • @robertoenriquegarciamartinez
    @robertoenriquegarciamartinez Год назад

    K0nze what if i already executed the command: "pip3 install virtualenv" and it works?... but when i execute pyenv doesnt works... can i still aproach your solution ???

  • @MicheleSblendorio
    @MicheleSblendorio 6 месяцев назад

    Very weel explained!
    Which Is the terminal do you use with colored branches?

  • @ghalebevaldo4416
    @ghalebevaldo4416 2 года назад +1

    great channel and content. thanx

    • @k0nze_builds
      @k0nze_builds  2 года назад +1

      Thank you Ghaleb! I'm happy you enjoy the content.

    • @ghalebevaldo4416
      @ghalebevaldo4416 2 года назад

      @@k0nze_builds wir können ja auf deutsch schreiben. Tübingen habe ich auch mal gewohnt nach den Studi-Zeiten ;-) Genau Deinen Content habe ich eigentlich gesucht. Verwunderlich, dass Du nicht mehr Abonnenten hast. Ist großes Kino hier Dein Installationsvideo. Die Conda usw. Installationen gingen mir auf den Sack. Vielen Dank dafür. VG Evaldo

    • @k0nze_builds
      @k0nze_builds  2 года назад +1

      Tübingen ist eine sehr schöne Stadt. Leider arbeite ich da nur und wohne nicht dort. Mit den Subscribern habe ich noch Zeit. Den Kanal gibt es erst seit drei Wochen. Ich hatte mal einen anderen RUclips Kanal zu einem anderen Thema und habe da viel gelernt über das Produzieren von Videos usw.

    • @ghalebevaldo4416
      @ghalebevaldo4416 2 года назад +1

      @@k0nze_builds alles klaro, 3 Wochen ist ja in der Tat ganz neu. Wünsche Dir viel Erfolg und Spass. Ich bin ja Abonnent und dann up to date

    • @k0nze_builds
      @k0nze_builds  2 года назад

      Danke!

  • @indraalapati989
    @indraalapati989 9 месяцев назад

    Awesome. What are the differences and benefits of pyenv over conda ?

  • @CanDoSo_org
    @CanDoSo_org Год назад

    Why do I get this:
    $ python -v
    zsh: command not found: python
    if I use this command:
    $ python3 --version
    Python 3.9.6 (but I installed the version 3.11.4)

  • @vickie_chan
    @vickie_chan 2 года назад +1

    Great job.

    • @k0nze_builds
      @k0nze_builds  2 года назад +1

      I'm glad you enjoyed the video and that it was helpful for you Vickie.

    • @vickie_chan
      @vickie_chan 2 года назад

      @@k0nze_builds yes really it was helped me.

  • @0797cjm
    @0797cjm 2 года назад

    Ps what profile are you using for your cmd? I like how yours is setup with the blue arrow

  • @hamedmatari2577
    @hamedmatari2577 2 года назад +1

    thanks for sharing

  • @adarshabenki1826
    @adarshabenki1826 2 года назад

    this is good. thanks

  • @fernandonieto874
    @fernandonieto874 Год назад

    Hi K0nze, I installed pyenv using your video tutorial. I tried to install the 2.6.4 version of python to run an application that requires it. I got this error message, "ERROR: The Python zlib extension was not compiled. Missing the zlib?", and the build failed. I looked online for fixes but I wasn't able to find one that fixed the problem. Any idea why it failed? thank you

  • @sarimkhan2306
    @sarimkhan2306 2 года назад

    global and local command was not working? please guid me and where was the venv file created?

  • @felliperibeiroteixeira
    @felliperibeiroteixeira Год назад

    Hi I have a question here, being Linux and Mac based on Unix, can the python virtual machine created on Mac run on Linux? or do you have to install python on Linux and create a virtual machine there?

  • @0797cjm
    @0797cjm 2 года назад

    Do you have a discord or anything? I seemed to have completely screw my putting and pip on my intel Mac running Monterey. I want Python to recognize Python 3.10 which it currently displays 3.8. I’ve tried everything but I messed something up. When I use pip it shows a location but when I use a pip conman d it says no module found. I tried installing pocketsphinx and since then have been having issues.
    If you wouldn’t mind helping it would be greatly appreciated. Awesome video!

  • @murtadha96
    @murtadha96 2 года назад

    Thanks!

  • @rogerward6242
    @rogerward6242 2 года назад

    For anyone who notices that pyenv doesn't change the version output when you run python -V, you need to run pyenv init --path and then open a new shell, then changing the pyenv will change the output of python -V

  • @aintyourcupoftea
    @aintyourcupoftea Год назад

    which theme are you using with your terminal?

  • @jairunet
    @jairunet 2 года назад

    Hello K0onze, great video and straight to the point, my only question is what's the value? difference? between installing it using brew vs github what extra control or benefit do you get? I am just curious to know, thank you again, subscribed and definitely checking what other cool useful videos you have on your channel.

    • @thuggfrogg
      @thuggfrogg 2 года назад +1

      Great question... So, the value is not having to me ME right now. I'm currently wondering why the library I just downloaded isn't working, despite having downloaded the dependencies. It's super frustrating, and I've been here many times before. Every time I've sorted out this problem in the past, I was able to continue my project without a problem, so it didn't seem like a big deal. But now, I'm realizing that every time I put down python for a month or I switch the types of projects I'm working on (such as API dev vs data science), then I try to go back to whatever I was doing a month ago, shit's broken. So, you won't see the value of doing this if you're doing it right from the beginning. If you want to experience the pain that lead to the need for environment management, then feel free to go ahead and use your base python environment ;) .

    • @jairunet
      @jairunet 2 года назад

      @@thuggfrogg I see, thank you for that info, I hope to hear some other reasons as well especially from K0nze?

  • @user-ef7rv7dh9d
    @user-ef7rv7dh9d Год назад

    good tutorial

  • @zaratt
    @zaratt 2 года назад

    Hi. Great video and and read on the website site as well.
    I have 2 questions:
    1 - I have installed Xcode, but it wasn't by command line. Do I need to install anyway?
    2 - In brew install openssl readline sqlite3 xz zlib, is SQLite the database you use? My idea is to use Mysql to learn and do some tests. In that case do I have to change or has nothing to do with it?
    Thanks

    • @k0nze_builds
      @k0nze_builds  2 года назад +2

      I'm happy you enjoyed the video Alandson.
      1 - XCode installs the command line tools when you installed in with the installer. When you run the command and XCode is already installed it will check that and won't install the command line tools a second time.
      2 - SQLite is the standard database that is integrated into Python, it is needed to compile Python from scratch (which pyenv does). Don't change the command otherwise pyenv will will fail. You can install MySQL, MariaDB, Postgres, etc. parallel to SQLite without any issues.

  • @Grapegum
    @Grapegum Год назад

    Hi @k0nze, thanks for the great content! I was following this guide (I'm pretty new to everything coding btw), and I got a message on terminal that says "zsh: command not found: code" I know there's bash, zhs and even something called fish (?) but I have no idea what the differences are, which one should I use and how to change between them. Does it mean all I've been doing needs to be redone in bash? I'm so lost 😢 (I do have VS Code installed in my Mac btw)

    • @joshuanareshmastachimendoz9990
      @joshuanareshmastachimendoz9990 Год назад

      Zsh, Bash and Fish are "shells" (I don't know how to explain what they are, but it's not a big deal). Since the message says "zsh: ..." it means you're using Zsh (which in a lot of things is similar to Bash). The message means it doesn't find a little program called "code" in the PATH (PATH is basically a list of directories in which the system looks for programs or scripts for the terminal). This program calls VSCode to open, so you need to go to VSCode and install "code" in your system so you can call VSCode from the terminal.

  • @super_po
    @super_po 2 года назад

    I cannot install any python version to my mac. I always got this make: *** [Programs/_testembed] Error 1
    make: *** Waiting for unfinished jobs....
    make: *** [python.exe] Error 1.
    Could someone help me? Thx

  • @andrehenrique813
    @andrehenrique813 2 года назад

    thank u

  • @romantheroman98
    @romantheroman98 Год назад

    I have installed pyenv on my mac. My sys version is 3.11 and I have a directory where I want to use 3.9. So I have ran pyenv local 3.9.x in that directory and it created that .python-version file though if I type no python ... it says command not found or if I typ python3 in that directory it still shows me the system version 3.11. Any help?

    • @AiEnthusiast999
      @AiEnthusiast999 Год назад +1

      To add the required pyenv initialization to your .zshrc file, you can append the following lines at the end of the file:
      # Pyenv configuration
      if command -v pyenv 1>/dev/null 2>&1; then
      eval "$(pyenv init -)"
      fi

    • @romantheroman98
      @romantheroman98 Год назад

      @@AiEnthusiast999 I have fixed my problem by adding some lines to my .bash_profile and running source .bash_profile. Now for some reason when running python3 -V the lower python version set via pyenv in my local project is acknowledged

    • @romantheroman98
      @romantheroman98 Год назад

      @@AiEnthusiast999 Ah probably that is exactly what you suggested but for zsh shell right?

    • @AiEnthusiast999
      @AiEnthusiast999 Год назад +1

      @@romantheroman98 yes

  • @kreestheshooter
    @kreestheshooter 2 года назад +1

    Enjoyed the video, but pyenv is giving me some issues. How do I remove it?

    • @k0nze_builds
      @k0nze_builds  2 года назад

      You can remove pyenv by removing the pyenv directory you cloned from github and remove the PATH extension and the init from your zshrc.

    • @kreestheshooter
      @kreestheshooter 2 года назад

      @@k0nze_builds Could you give a bit more of a detailed explanation? I'm really a beginner with this stuff.. Was able to remove the commands from the zshrc and remove the pyenv directory. All of the python versions I installed through pyenv are gone, but pyenv is not.

    • @k0nze_builds
      @k0nze_builds  2 года назад +1

      @@kreestheshooter When you removed the pyenv directory and all the lines added to the zshrc pyenv is uninstalled otherwise you have missed removing something. Also consult the official uninstall instructions: github.com/pyenv/pyenv#uninstalling-pyenv

  • @bishwokarki9884
    @bishwokarki9884 2 года назад

    pyenv global 2.7.12
    this part is not setting global version in my mac. please help

    • @k0nze_builds
      @k0nze_builds  2 года назад

      Is there any warning or error message?

  • @looploop6612
    @looploop6612 2 года назад

    not working for M1

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w 2 года назад

    Can pyenv be used together with Poetry?

    • @k0nze_builds
      @k0nze_builds  2 года назад +1

      Yes, you can use pyenv with poetry. I actually use pyenv together with poetry daily.

  • @quenting4885
    @quenting4885 4 месяца назад

    I hope someone could help me.
    When using :
    python -m venv .venv
    It take lot of time and I have to do ctrl-c, but it seem to work. When activating .venv my python command change path but not pip. Dispite having a working pip installed.
    Using
    python -venv --without-pip .venv
    Work fine, but as intended it doesn't install pip.
    Does anyone know how to solve this strange issue?

  • @rickyardo2944
    @rickyardo2944 Год назад

    I stopped watching when I heard "...and i already installed the xcode command line tools before..." Why? because, in a Tutorial worth watching nothing should be assumed.
    In a Tutorial worth watching ,you should show how to find out if something is already installed and where and what version and if it needs updating and how...
    I will stop here...

  • @dikshyakasaju7541
    @dikshyakasaju7541 Год назад +1

    Great video but this doesn't really work for ARM64 architecture. Would be great if you could upload a video which is specifically for ARM64.
    Error as below:
    BUILD FAILED (OS X 12.6 using python-build 2.3.9-1-gff93c58b)
    Inspect or clean up the working tree at /var/folders/85/f8v3b1zn62j3czh7dwwfm57w0000gn/T/python-build.20221221110735.14977
    Results logged to /var/folders/85/f8v3b1zn62j3czh7dwwfm57w0000gn/T/python-build.20221221110735.14977.log
    Last 10 log lines:
    "_libintl_textdomain", referenced from:
    _PyIntl_textdomain in libpython3.9.a(_localemodule.o)
    _PyIntl_textdomain in libpython3.9.a(_localemodule.o)
    ld: symbol(s) not found for architecture x86_64
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [Programs/_testembed] Error 1
    make: *** Waiting for unfinished jobs....
    make: *** [python.exe] Error 1

  • @khasanshadiyarov
    @khasanshadiyarov 2 года назад +1

    OOOOOK Ladies and Gentelmen, for people who can't change python version via pyenv global X.X.X, DO NEXT:
    1. Type pyenv init --path
    2. Copy the output
    3. Place it first line in next files: ~/.bashrc, ~/.zshrc, ~/bash_profile
    4. Open new terminal and type pyenv global X.X.X again
    Thank you

    • @42kilam36
      @42kilam36 2 года назад

      Where do i paste the output?

  • @puneethshankar460
    @puneethshankar460 Год назад

    * system (set by /Users/puneeth.shankar/.pyenv/version)
    anaconda3-2022.05
    zsh: command not found: python
    zsh: command not found: anaconda

  • @jeffabc1997
    @jeffabc1997 5 месяцев назад

    thank you. Great video!