No video

Python Tutorial: How to Set the Path and Switch Between Different Versions/Executables (Windows)

  Рет қаралды 199,770

Corey Schafer

Corey Schafer

Күн бұрын

In this Python Programming Tutorial, we will be learning how to set the PATH environment variable on the Windows Operating Systems.
Be one of the first 200 people to sign up with this link and get 20% off your premium subscription. brilliant.org/cms
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 Mac and Linux:
• Python Tutorial: How t...
✅ Support My Channel Through Patreon:
/ coreyms
✅ Become a Channel Member:
/ @coreyms
✅ One-Time Contribution Through PayPal:
goo.gl/649HFY
✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
✅ Corey's Public Amazon Wishlist
a.co/inIyro1
✅ Equipment I Use and Books I Recommend:
www.amazon.com...
▶️ You Can Find Me On:
My Website - coreyms.com/
My Second Channel - / coreymschafer
Facebook - / coreymschafer
Twitter - / coreymschafer
Instagram - / coreymschafer
#Python

Пікірлер: 139
@mihaigrigore2136
@mihaigrigore2136 5 жыл бұрын
Pure gold this video, like all your others I have watched on Python. Crystal clear, fast paced, direct to the target. Yours is definitely The BEST Python course I watched (and I have seen a few...). I lost a few days exactly on the path issue as I could not find a clear explanation on the path ORDER. Your video showed me exactly the detail I was missing. Thank you!!! I would include this in the playlist on videos about "Setting up a Python Environment". Paypal-ed you.
@coreyms
@coreyms 5 жыл бұрын
Thanks!
@chrystiankownacki9867
@chrystiankownacki9867 4 жыл бұрын
Thank you Corey, this is exactly what I was looking for. Clear and easy to understand PATH breakdown. All the best!
@VictorOlet
@VictorOlet 4 жыл бұрын
(For my future reference) 4:50 Adding directories to the path environment variable 10:40 Find the location of the python you're using using 'sys' 12:24 (Echo path) 13:52 Installed a package but not found when importing it 14:54 (Using pip show to get location of a package) 16:50 When the CL and Editor are using different python versions (Sublime Text as example)
@aliguliyev2122
@aliguliyev2122 4 жыл бұрын
thanks))
@sirskye8345
@sirskye8345 2 жыл бұрын
Jack Pot! (For context, I use windows). I was trying to create a virtual environment and I ran into a block because my default python interpreter was set to the one in my c compiler(for linux, its MinGW). The venv file didn't have a 'scripts' file. It was a nightmare. Luckily, I changed my system environment path and changed it to my separately installed python interpreter for windows! Best video ever!
@jeremyclark9697
@jeremyclark9697 4 жыл бұрын
I've spend hours on StackOverflow and numpy documentation trying to figure out why my modules won't import. This is the only advice that has actually worked. THANK YOU!
@gowthamreddy2236
@gowthamreddy2236 2 жыл бұрын
These videos are gold standard. Used to struggle with these... but not anymore... Thank you Corey...!!
@juliancardona3508
@juliancardona3508 6 жыл бұрын
By far one of the most useful videos on KZfaq! Awesome! I pip installed flask but also installed python using anaconda which I guess is messing up flask modules along with peewee modules. Hopefully this helps me modify how my machine looks for peewee and flask libraries.
@rbharij7619
@rbharij7619 4 жыл бұрын
Thanks Corey! Hours of frustration resolved, could not get Atom or Sublime to work. All the best.
@johnyiakras6987
@johnyiakras6987 2 жыл бұрын
You are the best python explainer on youtube
@avivbaltsan7583
@avivbaltsan7583 5 жыл бұрын
Finally a video covering this, and also so well explained! Thanks Corey!
@farzaddalavi9666
@farzaddalavi9666 4 жыл бұрын
I really appreciate it. I was confused about how can change between different Python version and install packages. It was really helpful.
@asdasasada722
@asdasasada722 6 жыл бұрын
Ty man wanted to start with it and you are the first one that actually helped. :)
@jeffplays8033
@jeffplays8033 4 жыл бұрын
THANK YOU SO MUCH!!! It took me 3 videos to get to this one and it made it so clear and easy to follow, unlike the other ones, thanks again for the help!
@jimbb1832
@jimbb1832 2 жыл бұрын
you explained this better than anyone else on the internet. It actually makes sense now, thanks
@salarghaffarian4914
@salarghaffarian4914 3 жыл бұрын
You are the best instructor I've ever see. Thanks for this very informative video! Awesome!
@lightninginmyhands4878
@lightninginmyhands4878 5 жыл бұрын
AS I SAID BEFORE.... TREMENDOUS. Corey, you are covering all the bases! In my case, the coworker who wrote his program in 2.7 (boo!) :D
@dariuszspiewak5624
@dariuszspiewak5624 2 жыл бұрын
There's an easier way to open 'cmd' in the right folder. Just type 'cmd' in the address bar of the folder you're interested in and the command prompt will open to this folder immediately. No need to copy the path. This also works with PowerShell and pwsh. Hope this helps.
@usamatahir7091
@usamatahir7091 4 жыл бұрын
This was so helpful. Thanks a lot dude!
@lalitsoni3596
@lalitsoni3596 Жыл бұрын
thanks alot sir , i am having much trouble in understanding the environment variable how to set or change them but after watching I'm clear about these things
@bryanmedina9808
@bryanmedina9808 3 жыл бұрын
This video has been extremely helpful to me. I was struggling heavily with not being able to import modules based on the IDE I used. I now have a thorough understanding of the impact and importance of setting the path. Thank you so much.
@barbarairena6714
@barbarairena6714 6 жыл бұрын
thanx! Very informative!!! It will save a lot of nerves & time to a lot of people!!!! GREAT JOB!!!!!!
@benjamincruzjr.5810
@benjamincruzjr.5810 4 жыл бұрын
I just stumbled onto this video as I was troubleshooting this exact issue and I couldn't be happier! Great content and easily explained!
@rohanramani6243
@rohanramani6243 6 жыл бұрын
Thank You Corey. You have been really helpful in learning python
@gregorytippett9692
@gregorytippett9692 5 жыл бұрын
Sweet Baby Jesus this is amazingly clear and helpful. Thank you!!!
@luck3971
@luck3971 2 жыл бұрын
Getting back into Python and needed a crash course on pip again. I know I can always count on Corey
@lawrencew8243
@lawrencew8243 4 жыл бұрын
Thanks Corey! explained very clearly and now I'm able to run bat file's from cmd
@aminelagab4830
@aminelagab4830 5 жыл бұрын
THIS IS GOLD !!!
@Fire_Fly_101
@Fire_Fly_101 5 жыл бұрын
Thanks alot for this video .... your videos always saves my day... thanks alot man..!
@ThatBeTheQuestion
@ThatBeTheQuestion 5 жыл бұрын
If only there were an alot bot on KZfaq like there is on Reddit...
@SteadyEddyyy
@SteadyEddyyy Жыл бұрын
Very helpful video. Thank you, Corey!
@rorysmith3658
@rorysmith3658 2 жыл бұрын
Fantastic video - answered all my questions regarding Path and Environment Variables in a clear and succinct manner. Subscribed!
@yahiaessam2248
@yahiaessam2248 5 жыл бұрын
DUUUUUUUUUUUUUDE THANK U !! Finally someone solved this problem.
@elirockenbeck6922
@elirockenbeck6922 6 жыл бұрын
Hey Corey, I can't express how much your videos have helped me. I appreciate all the effort you put in so much! I was wondering if you could possibly do some sort of video on GUI programming in python, possibly tkinter? If not do you have any recommended material for such? Thanks!
@qzorn4440
@qzorn4440 Жыл бұрын
a most excellent path video. 🥳 It is so helpful to click the path box when installing python or do this mild pain cleanup stuff. 😎 Thank you for the best how to video.
@sureshkumargondi4631
@sureshkumargondi4631 4 жыл бұрын
Corey content is top notch always 🔥🔥👌 thanks again.
@zvs78
@zvs78 4 жыл бұрын
Great video! All clear and simple
@shivibhatia1613
@shivibhatia1613 5 жыл бұрын
this is magic. Amazing video. Do you also teach NLP and AI using python please. I would love to join the monthly package. Phenomenal videos
@jadbchelly8188
@jadbchelly8188 3 жыл бұрын
Very Helpful!! saved my day
@prasad1686
@prasad1686 4 жыл бұрын
Excellent explanation - Thank you
@xBlackMambaWT
@xBlackMambaWT 6 жыл бұрын
Thanks! Although I am not native, the tutorial is very clear.
@rohanramani6243
@rohanramani6243 6 жыл бұрын
Native to English or to Python... LOL
@xBlackMambaWT
@xBlackMambaWT 6 жыл бұрын
Rohan Ramani both
@qrubmeeaz
@qrubmeeaz 3 жыл бұрын
Enlightening as always!
@Satyamkumar-yi6um
@Satyamkumar-yi6um 4 жыл бұрын
Thank u Corey
@woofie1000
@woofie1000 3 жыл бұрын
I wish I could give you more than one like for this!! Thank you so much Corey!
@Andrew-ri1mi
@Andrew-ri1mi 4 жыл бұрын
the best quality video…
@dimitrybretoux9708
@dimitrybretoux9708 3 жыл бұрын
you saved my life.Thank you
@alirezamogharabi8733
@alirezamogharabi8733 2 жыл бұрын
Really helpful, Thank you!
@GNFR15
@GNFR15 4 жыл бұрын
Thank you man much appreciated!
@gawaderajesh
@gawaderajesh 3 жыл бұрын
Perfect... This is most detailed video and nicely explained... Thank you
@satishchougule4748
@satishchougule4748 3 жыл бұрын
You are a really cool and awesome guy!! I enjoy all the videos related to Python/Django.
@sachynk8923
@sachynk8923 3 жыл бұрын
Thank you! this works like a champ
@adrianradu4399
@adrianradu4399 5 жыл бұрын
Excellent video! Subscribed
@quietcopse8407
@quietcopse8407 5 жыл бұрын
excellent corey. very useful
@manajitdas7619
@manajitdas7619 4 жыл бұрын
thanks
@hyper8547
@hyper8547 3 жыл бұрын
You are just amazing!
@tymothylim6550
@tymothylim6550 3 жыл бұрын
Thank you very much for this video! It was really well done and easy to follow :)
@mageshravichandran3616
@mageshravichandran3616 3 жыл бұрын
Thank you brother❤️❤️
@sissinacera5344
@sissinacera5344 4 жыл бұрын
you are the best ever please continue with python how to buils apps ... ans thanks for you
@jyoutubezhu
@jyoutubezhu 6 жыл бұрын
Thank you. Very useful 👍👍👍
@arun_sain
@arun_sain 4 жыл бұрын
So helful
@thomasre8073
@thomasre8073 3 жыл бұрын
Thank you!
@ZeRo-vd2mt
@ZeRo-vd2mt 3 жыл бұрын
THANK YOU SO MUCH, I SUBBED TOO!! THIS HELPED ME A LOT
@Guilleluisiana
@Guilleluisiana 3 жыл бұрын
Thank you very much, very useful tutorial
@ab5848
@ab5848 3 жыл бұрын
Thank you sir 🙏
@taneliharkonen2463
@taneliharkonen2463 2 жыл бұрын
such gold
@yon1621
@yon1621 5 жыл бұрын
Thank you very very much!!!!
@mrj6967
@mrj6967 2 жыл бұрын
tnx for this useful video of yours
@rodmayor3689
@rodmayor3689 6 жыл бұрын
Corey, Have you had any tutorial videos using the optimization modules in real time? Thanks!
@muntadher8087
@muntadher8087 2 жыл бұрын
Thank you so much
@xlu125
@xlu125 5 жыл бұрын
great job, thank you
@satisharvapalli3457
@satisharvapalli3457 6 жыл бұрын
Thank you Corey for helping me to make easy to execute my codes. Please make a video on 'Windows subsystem for Linux', i'm getting problem while installing virtualenv through it. I have seen your video about this. very much informative it is. Thank you.
@coreyms
@coreyms 6 жыл бұрын
Hey there. I already do have a video on the Linux subsystem for Windows. If you search my channel you should find it.
@arhamsiddiqui2617
@arhamsiddiqui2617 3 жыл бұрын
thank you!
@tobiass6584
@tobiass6584 4 жыл бұрын
Thank you!!!
@rangabharath4253
@rangabharath4253 6 жыл бұрын
Nice one👌👍☺️
@MrMiguelcdpmarques
@MrMiguelcdpmarques 6 жыл бұрын
Hi Corey. Thanks again for your videos. I would have a suggestion of a topic for your videos. Something I have heard of very often but never really understood. The Python eval function.
@KingsofSummer
@KingsofSummer 4 жыл бұрын
amazing
@nziemaraangnzienguiboussou8334
@nziemaraangnzienguiboussou8334 6 жыл бұрын
Can you make java programming video? The way you explain is just great.
@dibyaranjanmishra4272
@dibyaranjanmishra4272 5 жыл бұрын
Amazing!!
@zaheerbeg4810
@zaheerbeg4810 2 жыл бұрын
You always #Rocks. Thanks #mentor
@cyberdemon667
@cyberdemon667 Жыл бұрын
It doesnt work for me, i have v3.11 and v3.10, and it always shows 3.10 even if i delete the 3.10 paths from the environment variables
@mohareb7835
@mohareb7835 3 жыл бұрын
hi Corey can you please make a video explain how to use MVT tool kit
@joker96699
@joker96699 6 жыл бұрын
Hey Corey, would you consider making a tutorial about flask restful? Thanks :)
@albert_chen
@albert_chen 3 жыл бұрын
would you recommend using pyenv to manage multiple python versions?
@shivamwagh22
@shivamwagh22 5 жыл бұрын
Is the process same when you want to use Anaconda with regular Python 3.7?
@gtanke
@gtanke 5 жыл бұрын
Thanks Corey Great Video. I have check my paths like you said in the video and it looks good but when I run python in the command line instead of python 3.7 it will run 3.5. i have to run commands py -3.7 to run python 3.7. I cannot delete 3.5 through programs and Features should i delete the python 3.5 folder not sure if i should do that though. Any suggestion, I tried google it but not any help.
@viraldaddhub6950
@viraldaddhub6950 4 жыл бұрын
Your video has been really helpful. I HV one query, I hv two python versions. One 3.7 and other with anaconda 3.8 but like I added both the paths to the environment variable... But when in command prompt , I write only python... Then also it says not recognised as an internal / external command... Pls help
@pankajholariya8331
@pankajholariya8331 4 жыл бұрын
Sir , plz plz , make a vedio on pywinauto module . How to close runnning appliction through pywinauto [ From pywinauto import application ]
@JohnDoe-cq3ic
@JohnDoe-cq3ic 5 жыл бұрын
how do we actually update python? or update python with Anaconda? perhaps you can do a video on Anaconda please....and how to use, navigate around Anaconda as well as setting up environments. Thanks
@tarsus235
@tarsus235 3 жыл бұрын
Why does my edit environment variable window look different than his? I'm using Window's 10 Enterprise.
@tanushreepareek8208
@tanushreepareek8208 Жыл бұрын
Hi, I have installed the package django and the path is the the same as in Python. When I hit the command Its giving me this error Could you please tell me what i should do to resolve this?
@wasitechlearning
@wasitechlearning 4 жыл бұрын
my sys.executable showing 'C:\\ProgramData\\Anaconda3\\python.exe' this path which is not set at PATH. Now, what should I do? I use anaconda also for a different purpose.
@secretr5024
@secretr5024 9 ай бұрын
I have python310 and python312 I am trying to switch but the thing is when I installed python10 I selected the option "Add python.exe to path" Which made it so I didn't have to add it to environment variables. However python312 was installed on my system but I never even wanted it so I am trying to switch back to python310 but they are both not in environment variables so do you know how you can help me?
@ahmedouerfelli4709
@ahmedouerfelli4709 4 жыл бұрын
When upgrading to a new version of python, how to install in the new version, all at once, the modules installed in the previous version?
@Thesrik23
@Thesrik23 6 жыл бұрын
Hey Please do video series on Django-Celery-Redis. Thanks!
@andresdeveloper9809
@andresdeveloper9809 2 жыл бұрын
you can resolve it using virtualsenv???
@harshkanumuri3977
@harshkanumuri3977 4 жыл бұрын
for some reason i cant change by system info paths ?
@lakshaychauhan9190
@lakshaychauhan9190 4 жыл бұрын
I updated environment variable paths but still same error is coming. please help
@aryalee4623
@aryalee4623 3 жыл бұрын
same..
@gecsus
@gecsus 2 жыл бұрын
If your current user in Windows does not have Admin privileges, the path inside a Command window will not function. You must either run the command window as admin or be in an admin account for the Path to be enforced or implemented. If you are not admin, your pip and python commands will not work and you will get the error that the command is not recognized.
@tanjakriko5190
@tanjakriko5190 5 жыл бұрын
hi corey i can't pip i use python 2.7 version 'pip' is not recognized as an internal or external command, operable program or batch file. how can i fix please help me
@powerhouses
@powerhouses 8 ай бұрын
Hi Corey. Thanks for the wonderful videos. I'm currently in Python hell. I have to make an executable but I get this message at the very end "Error named module _bootlocale ". I'm working with code someone else wrote. I'm using Python 13.0.2 32 bit on Windows 10 64 bit. The statement from pyinstaller_versionfile import _bootlocale in my .py file is causing the issue but I need this to work for my program to work. I can't find anything on the Internet that works. I saw someone suggest change it to "from pyinstaller_versionfile import _locale" but that didn't work for me. Do you know what I can import to get my code to work?
@user-ud2kn2iq5l
@user-ud2kn2iq5l 7 ай бұрын
🎯 Key Takeaways for quick navigation: [\[00:00\](kzfaq.info/get/bejne/i85imMV3vJ6ziYE.html)] 📂 *Introduction to working with file objects in Python,* - Understanding the importance of working with file objects in Python for desktop or web applications. - Introduction to the built-in `open` command to obtain a file object. [\[03:49\](kzfaq.info/get/bejne/i85imMV3vJ6ziYE.html)] 🔄 *Using context managers for file operations,* - Explanation of using the `with` keyword for a context manager when working with files. - Demonstrating the benefits of context managers in automatically handling file closure. - Accessing the file object within the context manager using the `as` keyword. [\[06:08\](kzfaq.info/get/bejne/i85imMV3vJ6ziYE.html)] 📄 *Reading file contents in different ways,* - Reading the entire content of a file using `F.read()` and storing it in a variable. - Exploring alternatives like `F.readlines()` and `F.readline()` to read lines or a single line. - Iterating through lines using a `for` loop for efficient reading of large files. [\[11:08\](kzfaq.info/get/bejne/i85imMV3vJ6ziYE.html)] 🔄 *Efficiently reading large files in chunks,* - Employing a `while` loop to read a file in chunks until the end. - Utilizing the `F.tell()` method to track the current position in the file. - Demonstrating the use of `F.seek()` to change the current position in the file. [\[14:47\](kzfaq.info/get/bejne/i85imMV3vJ6ziYE.html)] 📝 *Writing to files and using the `seek` method,* - Explaining the need to open files in write mode (`'w'`) for writing operations. - Demonstrating writing content to a file and the implications of overwriting existing files. - Introducing the `F.seek()` method for changing the file write position. [\[16:33\](kzfaq.info/get/bejne/i85imMV3vJ6ziYE.html)] 📑 *Handling multiple file operations simultaneously,* - Opening and creating a new file for writing alongside an existing file. - Writing content to a file and showcasing how seek affects subsequent write operations. - Discussing potential use cases for the `F.seek()` method when writing to files. [\[18:11\](kzfaq.info/get/bejne/i85imMV3vJ6ziYE.html)] 📄 *Copying text files in Python,* - Demonstrating how to make a copy of a text file (`test.txt`) using file objects in Python. - Opening the original file in read mode and the copy file in write mode. - Iterating through each line of the original file and writing it to the copy file. [\[20:37\](kzfaq.info/get/bejne/i85imMV3vJ6ziYE.html)] 🖼️ *Copying image files using binary mode,* - Attempting to copy an image file (`Bronx.jpg`) without using binary mode and encountering an error. - Introducing binary mode by appending 'b' to the read and write modes (`rb` and `wb`). - Successfully copying the image file after enabling binary mode. [\[22:12\](kzfaq.info/get/bejne/i85imMV3vJ6ziYE.html)] 🔄 *Copying files in specific chunk sizes,* - Setting up a chunk size (e.g., 4096) for reading and writing files in specific chunks. - Using a loop to read chunks from the original file and write them to the copy until the file is fully copied. - Demonstrating how to control the copy process by chunk size for more precise file operations. [\[24:05\](kzfaq.info/get/bejne/i85imMV3vJ6ziYE.html)] 📝 *Conclusion and future topics,* - Summarizing the key concepts covered in the tutorial. - Mentioning future topics to be covered, such as working with temporary files and in-memory files. - Encouraging viewers to ask questions in the comment section for further clarification or assistance. Made with HARPA AI
@Joshua-ot7fu
@Joshua-ot7fu 4 жыл бұрын
is that worked if i using python 3.7 and 3.8 ?
Get 10 Mega Boxes OR 60 Starr Drops!!
01:39
Brawl Stars
Рет қаралды 19 МЛН
WILL IT BURST?
00:31
Natan por Aí
Рет қаралды 29 МЛН
艾莎撒娇得到王子的原谅#艾莎
00:24
在逃的公主
Рет қаралды 54 МЛН
PLEASE Use These 5 Python Decorators
20:12
Tech With Tim
Рет қаралды 108 М.
Python Tutorial: File Objects - Reading and Writing to Files
24:33
Corey Schafer
Рет қаралды 1,8 МЛН
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1,1 МЛН
5 Common Python Mistakes and How to Fix Them
29:19
Corey Schafer
Рет қаралды 288 М.
Regular Expressions (Regex) Tutorial: How to Match Any Pattern of Text
37:55
Python Tutorial: Web Scraping with BeautifulSoup and Requests
45:48
Corey Schafer
Рет қаралды 1,1 МЛН
Get 10 Mega Boxes OR 60 Starr Drops!!
01:39
Brawl Stars
Рет қаралды 19 МЛН