Тёмный

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

k0nze
Подписаться 4,6 тыс.
Просмотров 54 тыс.
50% 1

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

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 109   
@k0nze_builds
@k0nze_builds 2 года назад
Download FREE Python Cheat Sheets: k0nze.gumroad.com
@muhammadhummayunyousaf6579
@muhammadhummayunyousaf6579 2 года назад
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!
@ianjeffries7972
@ianjeffries7972 7 месяцев назад
Virtual environments and different python versions were the bane of my existence until this video. Thanks mate!
@mistersquid
@mistersquid 9 месяцев назад
Thank you for your clear explanation of how to manage python versions. First rate.
@timothygrupp
@timothygrupp Месяц назад
Brilliant. Thanks so much. Clear, concise, correct!
@nelsonfleig5024
@nelsonfleig5024 4 месяца назад
Super helpful video! Was looking for something similar to NVM for Python and this fit the bill perfectly!
@richardrandolph9794
@richardrandolph9794 3 месяца назад
Thanks for the great video. I have this running on macOS, Win11, and Mint Linux!
@HannahRobinsonNZ
@HannahRobinsonNZ 6 месяцев назад
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.
@MicheleSblendorio
@MicheleSblendorio 8 месяцев назад
Very weel explained! Which Is the terminal do you use with colored branches?
@BlancoYT
@BlancoYT Год назад
Very well explained I wish I found this when I needed it 4 months ago :(
@iamsumanghosh
@iamsumanghosh 2 месяца назад
Thanks a ton for this video.
@parhamfa
@parhamfa 2 года назад
I get "BUILD FAILED (OS X 12.3 using python-build 20180424)" error with any version of 3.6.x to 3.9.x
@kelstongroup
@kelstongroup 2 года назад
I am getting the same error
@parthtailor1189
@parthtailor1189 Год назад
did you get solution?
@marrufomcbo
@marrufomcbo 2 года назад
thanks! very detailed and helpful! you got yourself a new follower today
@maheshmagalage1886
@maheshmagalage1886 2 года назад
This is golden! Thank you!
@k0nze_builds
@k0nze_builds 2 года назад
I'm happy I could help you out Mahesh!
@zhuweivideo
@zhuweivideo 3 года назад
Great! that is exactly what I need
@k0nze_builds
@k0nze_builds 3 года назад
I'm happy the video was helpful for you!
@darkredtulip
@darkredtulip Год назад
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?
@indraalapati989
@indraalapati989 11 месяцев назад
Awesome. What are the differences and benefits of pyenv over conda ?
@bbrendon
@bbrendon Год назад
Whoa! No downvotes? Well done!
@juliensallerin4641
@juliensallerin4641 2 года назад
Great ressource , thanks
@k0nze_builds
@k0nze_builds 2 года назад
I'm glad it was helpful for you Julien!
@seraphimwang
@seraphimwang 2 года назад
Humongous thanks 🙏🏻!
@sachuynhvan385
@sachuynhvan385 2 года назад
Excellent! Thanks for your video
@k0nze_builds
@k0nze_builds 2 года назад
I'm happy the video was helpful for you!
@merc1er
@merc1er 3 года назад
High quality video, thank you!
@k0nze_builds
@k0nze_builds 3 года назад
I'm glad the you enjoyed the video and it was helpful for you Corentin!
@ederarmandoanillolora3048
@ederarmandoanillolora3048 10 месяцев назад
Good video. Absolutely awesome!
@bls512
@bls512 2 года назад
Thanks for this! Nice website :)
@k0nze_builds
@k0nze_builds 2 года назад
Glad you like it!
@MohammedJiménez-z4d
@MohammedJiménez-z4d Год назад
Hi @k0nze, thanks for the great content. Is is very helpful
@thecodechapter
@thecodechapter Год назад
You were really helpful. Thanks :)
@ilushasm
@ilushasm Год назад
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.
@IbrahimKaleel-jp4el
@IbrahimKaleel-jp4el 4 месяца назад
@k0nze_builds, what is the purpose of this command -> "xcode-select --install"
@talhaahmed-nb7tk
@talhaahmed-nb7tk Год назад
It was really helpful. well explained as well.
@fayyaznaeem5241
@fayyaznaeem5241 2 года назад
Excellent! Thank you :)
@k0nze_builds
@k0nze_builds 2 года назад
You're very welcome!
@0797cjm
@0797cjm 2 года назад
Ps what profile are you using for your cmd? I like how yours is setup with the blue arrow
@alwayserik
@alwayserik 2 года назад
Why didn't we use pyenv-virtualenv?
@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 ???
@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 года назад
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.
@TamLeAuthentic
@TamLeAuthentic Месяц назад
Thank you!
@SpencerDavis2000
@SpencerDavis2000 2 года назад
great clear tutorial thanks
@surajmatta9204
@surajmatta9204 2 года назад
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
@jpablomayorga
@jpablomayorga 2 года назад
Gracias excelemte video, me acabas de salvar y ahorrarme futuros dolores de cabeza
@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 года назад
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?
@yasin2210
@yasin2210 6 месяцев назад
you are awesome man!!
@roberthmejias
@roberthmejias 3 года назад
Thanks a lot!!! you're awesome
@k0nze_builds
@k0nze_builds 3 года назад
Thank you Roberth! I'm happy it was helpful for you
@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!
@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?
@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
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.
@GreenEye2929
@GreenEye2929 11 дней назад
Thanks😊
@ghalebevaldo4416
@ghalebevaldo4416 3 года назад
great channel and content. thanx
@k0nze_builds
@k0nze_builds 3 года назад
Thank you Ghaleb! I'm happy you enjoy the content.
@ghalebevaldo4416
@ghalebevaldo4416 3 года назад
@@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 3 года назад
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 RU-vid Kanal zu einem anderen Thema und habe da viel gelernt über das Produzieren von Videos usw.
@ghalebevaldo4416
@ghalebevaldo4416 3 года назад
@@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 3 года назад
Danke!
@hamedmatari2577
@hamedmatari2577 2 года назад
thanks for sharing
@k0nze_builds
@k0nze_builds 2 года назад
Thanks for watching!
@aintyourcupoftea
@aintyourcupoftea Год назад
which theme are you using with your terminal?
@sarimkhan2306
@sarimkhan2306 2 года назад
global and local command was not working? please guid me and where was the venv file created?
@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
@fayax
@fayax Год назад
Excellent!!
@SaulBurgos-k5e
@SaulBurgos-k5e Год назад
good tutorial
@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 года назад
Great job.
@k0nze_builds
@k0nze_builds 2 года назад
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.
@adarshabenki1826
@adarshabenki1826 2 года назад
this is good. thanks
@murtadha96
@murtadha96 2 года назад
Thanks!
@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 Год назад
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 Год назад
@@romantheroman98 yes
@kreestheshooter
@kreestheshooter 2 года назад
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 года назад
@@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
@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
@khasanshadiyarov
@khasanshadiyarov 2 года назад
Nope, doesn't work
@khasanshadiyarov
@khasanshadiyarov 2 года назад
Thank you I got my own solution using ur advice with pyenv init --path
@Luiz_Aquino
@Luiz_Aquino Год назад
how I do that
@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
@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?
@andrehenrique813
@andrehenrique813 2 года назад
thank u
@user-wr4yl7tx3w
@user-wr4yl7tx3w 2 года назад
Can pyenv be used together with Poetry?
@k0nze_builds
@k0nze_builds 2 года назад
Yes, you can use pyenv with poetry. I actually use pyenv together with poetry daily.
@looploop6612
@looploop6612 2 года назад
not working for M1
@quenting4885
@quenting4885 6 месяцев назад
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 Год назад
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 года назад
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 2 года назад
* system (set by /Users/puneeth.shankar/.pyenv/version) anaconda3-2022.05 zsh: command not found: python zsh: command not found: anaconda
@jeffabc1997
@jeffabc1997 6 месяцев назад
thank you. Great video!
Далее
Как не носить с собой вещи
00:31
Просмотров 894 тыс.
How To Setup A MacBook Pro M1 For Software Development
21:23
Python install with pyenv on Mac
8:14
Просмотров 7 тыс.
Manage Multiple Python Versions with PyEnv
9:54
Просмотров 22 тыс.
Setup VS Code for Python with Pyenv and Poetry
20:57
Просмотров 47 тыс.
25 nooby Python habits you need to ditch
9:12
Просмотров 1,8 млн
Which Python Package Manager Should You Use?
5:06
Просмотров 156 тыс.
Why You Should Use Python if __name__ == "__main__"
5:26
Как не носить с собой вещи
00:31
Просмотров 894 тыс.