

In this Python Programming Tutorial, we will be learning how to set the PATH environment variable on the Mac & Linux Operating Systems.
Be one of the first 200 people to sign up with this link and get 20% off your premium subscription.
We will also learn how to modify the PATH in order to switch between different Python versions and executables. This is an essential skill that trips up many people when they first start learning Python and will definitely help you in many real-world situations. Let’s get started…
How to Set the Path on Windows:
✅ Support My Channel Through Patreon:
✅ Become a Channel Member:
✅ One-Time Contribution Through PayPal:
✅ Cryptocurrency Donations:
Bitcoin Wallet – 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet – 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet – MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
✅ Corey’s Public Amazon Wishlist
✅ Equipment I Use and Books I Recommend:
▶️ You Can Find Me On:
My Website –
My Second Channel –
Facebook –
Twitter –
Instagram –
#Python
source
THANK YOU 🙂
Hey Corey! Thanks for all videos you do! Please can you make video about working with Visual Studio Code! There has a lot of issues with same json file when we start use data base in following your flask tutorial… thanks
Maybe no longer valid since 2020
Thanks man you saved me and my operating system to because I corrupted my operating system 5 x on installing python and this is 11th time installing manjaro KDE plasma I am struggling to install python 3.9 and finding the path for it and configuring the path for Atom text editor. Please make a video on how to set environment variable specifically for Linux.
I wonder what you get when do you which python2 @3:16 would like to compare paths vs which python3 for understanding. Thanks (you've already made the video so might be too late ).
I need a little help here:
My setup is Python3 installed in WSL Ubuntu and i want to work on it remotely via VS Code.
With Python3 itself is everything fine (it is on PATH). But when i installed pylint via pip, i get a message that says that pylint script is not on path.
How do i add these packages to path?
this is one of the most useful python intro for beginner! thx a lot
Thank you. I've learned so much.
This is amezing video i have ever seen …..Thankyou so much sir
wow you are very clear in your explanations thank you
You are the man! all my libraries used to be install on python 2.7. You helped a man today!
Trying to do this in sublime text 3
what does python is hashed mean?
Thank so much for explaining in deep
So incredibly helpful. Got unstuck from a problem I've been stuck on for a while. Hitting the subscribe button!!!
Thanks a lot! It was very helpful.
finally the answers i was looking for. Thank you.
Wow very well explained very interesting!!!
Not to get confused and misunderstand, but some of the mentioned methods here only work for Bash, and not ZSH right?
Kindly help me when i type pip3 it doesn't give me the location from the python 3.X folder, how do i change the path for pip?
Corey, you made my day. Now I can go to sleep happily
This is such a great thorough tutorial. You explain everything so well. Thank you so much for your time and effort to help others!
If anyone is trying to do this on Mac Catalina, they have switched from using bash shell to ZSH. This means instead of using nano to edit .bash_profile, you should edit .zshrc instead. Everything else should be the same. Only took me 2 hours to figure this out.
Hey Corey, much love for the vids! Quick question … my sys.executable is different than what my path should be. Do I change my path to match the sys.executuable, or can I change the sys.executable instead ?? (which I do not know how to do)
Cory Schafer, without any exaggeration your tutorial is one of the very best one. Very pleased to find it.
This video helped me a lot and saved me a lot of hours. Thank you for the author to breaking down the problem and explaining it in detail! Great job
Thanks for the great explanation!
my version of nano on linux mint is very different. It doesn't have anything about path. arg! Anyone have any ideas?
If you set your terminal to use zsh (Catalina default shell) remember that the new equivalent to ~/.bash_profile is ~/.zshrc (for setting your aliases) and ~/.zshenv (for customizing your PATH).
se more here: http://zsh.sourceforge.net/Intro/intro_3.html
thank you
FYI: You don't actually have to restart the terminal in order for .bash_profile edits to take effect… All ou do is the following:
type 'source .bash_profile' and it will refresh the .bash_prifile in the system.
Dang Anaconda jacked up my PATH settings! Appreciate this video!!!!!
Hey guys… You need to edit the .zsh file instead of .bash_profile if you've updated your Mac's shell from Bash/sh to zsh like apple recommends in terminal of macOS Catalina (v10.15). Took me half a day to figure it out, so the path finally loads and alias commands work. Read this for more info if you want: https://coolestguidesontheplanet.com/how-to-add-to-the-shell-path-in-macos-using-terminal/
God bless you! I swear every other guide or video on the web is subtly designed to trip you up except yours. I don't know how you do it, but please please keep doing it? Do you have a Patreon?
@4:36 How did you split them all up at the same time? I am using PyCharm.
THANK YOU THANK YOU THANK YOU THANK YOU
Corey could help out to change path for conda, I even changed the path it is showing "common not found",even after I installed and changed the path of anaconda.
(For my future reference)
2:50 To find location of Python3 (Issue: python2 runs default)
8:20 Adding paths manually
13:51 Setting up an Alias
17:24 Find out which python (exact) you're running if you have multiple virtual environments using 'sys'
18:45 You've installed a package but not found when importing
19:38 (Pip show command to show package location)
21:42 When the CL and Editor are using different python versions (Sublime Text as example)
25:25 Virtual environments demo and locating its path using 'sys'
Hi Corey so I am only just starting out with python. Long story short I deleted a whole amass of preexisting python files on my Mac. I don’t know what they did and I don’t know how badly it’s effected my laptop but now when I run pre-written scripts after having reinstalled python it’s giving me so many errors! I don’t know if you’ll ever reply but I would love the opportunity to fix my mistake by learning some tips from you?