Python Tutorial: How to Set the Path and Switch Between Different Versions/Executables (Windows)
Вставка
- Опубліковано 25 лип 2018
- 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/shop/coreyschafer
▶️ You Can Find Me On:
My Website - coreyms.com/
My Second Channel - / coreymschafer
Facebook - / coreymschafer
Twitter - / coreymschafer
Instagram - / coreymschafer
#Python
(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)
thanks))
Thank you Corey, this is exactly what I was looking for. Clear and easy to understand PATH breakdown. All the best!
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.
Thanks!
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!
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.
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!
By far one of the most useful videos on UA-cam! 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.
I just stumbled onto this video as I was troubleshooting this exact issue and I couldn't be happier! Great content and easily explained!
These videos are gold standard. Used to struggle with these... but not anymore... Thank you Corey...!!
I really appreciate it. I was confused about how can change between different Python version and install packages. It was really helpful.
Finally a video covering this, and also so well explained! Thanks Corey!
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!
you explained this better than anyone else on the internet. It actually makes sense now, thanks
Fantastic video - answered all my questions regarding Path and Environment Variables in a clear and succinct manner. Subscribed!
Thanks Corey! Hours of frustration resolved, could not get Atom or Sublime to work. All the best.
You are the best instructor I've ever see. Thanks for this very informative video! Awesome!
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
Ty man wanted to start with it and you are the first one that actually helped. :)
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.
Thanks Corey! explained very clearly and now I'm able to run bat file's from cmd
Thank You Corey. You have been really helpful in learning python
This was so helpful. Thanks a lot dude!
thanx! Very informative!!! It will save a lot of nerves & time to a lot of people!!!! GREAT JOB!!!!!!
You are the best python explainer on youtube
Getting back into Python and needed a crash course on pip again. I know I can always count on Corey
Very helpful video. Thank you, Corey!
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
Great video! All clear and simple
I wish I could give you more than one like for this!!
Thank you so much Corey!
Perfect... This is most detailed video and nicely explained... Thank you
You are a really cool and awesome guy!! I enjoy all the videos related to Python/Django.
Thank you very much for this video! It was really well done and easy to follow :)
Corey content is top notch always 🔥🔥👌 thanks again.
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.
Excellent video! Subscribed
Very Helpful!! saved my day
Sweet Baby Jesus this is amazingly clear and helpful. Thank you!!!
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
Enlightening as always!
Thank you man much appreciated!
Thank you very much, very useful tutorial
Really helpful, Thank you!
Excellent explanation - Thank you
Corey,
Have you had any tutorial videos using the optimization modules in real time?
Thanks!
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!
Thank you! this works like a champ
Thanks alot for this video .... your videos always saves my day... thanks alot man..!
If only there were an alot bot on UA-cam like there is on Reddit...
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.
THIS IS GOLD !!!
excellent corey. very useful
Thank you. Very useful 👍👍👍
you saved my life.Thank you
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.
THANK YOU SO MUCH, I SUBBED TOO!! THIS HELPED ME A LOT
Nice one👌👍☺️
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
Is it for Windows 8 & 10 OS..? Becoz In Widows 7 SP1, By installing Python automatically set the PATH to the environment variable and it also enables PIP with it since the Sripts folder includes in the PATH. No need to set another Scripts PATH for PIP..................sorry I was wrong. when I type pip in cmd It worked before now it says command not found. and It doesnt allow me to set scripts path below the executable path. If i add new Scripts path it replacing the original path. How to do it Windows & please?
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?
You are just amazing!
Thank you brother❤️❤️
Thank u Corey
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.
you are the best ever please continue with python how to buils apps ... ans thanks for you
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
great job, thank you
Thank you!
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?
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?
tnx for this useful video of yours
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.
Hey there. I already do have a video on the Linux subsystem for Windows. If you search my channel you should find it.
Thank you very very much!!!!
Amazing!!
Thank you so much
Thank you sir 🙏
Is the process same when you want to use Anaconda with regular Python 3.7?
thank you!
Why does my edit environment variable window look different than his? I'm using Window's 10 Enterprise.
Hey Corey, would you consider making a tutorial about flask restful? Thanks :)
would you recommend using pyenv to manage multiple python versions?
Thank you!!!
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
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?
So helful
hi Corey can you please make a video explain how to use MVT tool kit
Can you make java programming video? The way you explain is just great.
thanks
Thanks! Although I am not native, the tutorial is very clear.
Native to English or to Python... LOL
Rohan Ramani both
DUUUUUUUUUUUUUDE THANK U !! Finally someone solved this problem.
for some reason i cant change by system info paths ?
the best quality video…
is that worked if i using python 3.7 and 3.8 ?
Fantastic, however, my sublime text 3 says this Python was not found but can be installed from the Microsoft Store: go.microsoft.com/fwlink?linkID=2082640. It automatically takes me to the Microsoft Store. It's a real issue. Not much information about this. Plus I think my Windows os is deleting files.
ps: does anyone know how to set a "build system" for a pipenv in the standard IDLE of python?
🎯 Key Takeaways for quick navigation:
[\[00:00\](ua-cam.com/video/Uh2ebFW8OYM/v-deo.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\](ua-cam.com/video/Uh2ebFW8OYM/v-deo.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\](ua-cam.com/video/Uh2ebFW8OYM/v-deo.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\](ua-cam.com/video/Uh2ebFW8OYM/v-deo.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\](ua-cam.com/video/Uh2ebFW8OYM/v-deo.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\](ua-cam.com/video/Uh2ebFW8OYM/v-deo.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\](ua-cam.com/video/Uh2ebFW8OYM/v-deo.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\](ua-cam.com/video/Uh2ebFW8OYM/v-deo.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\](ua-cam.com/video/Uh2ebFW8OYM/v-deo.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\](ua-cam.com/video/Uh2ebFW8OYM/v-deo.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
you can resolve it using virtualsenv???
amazing
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
You always #Rocks. Thanks #mentor
driver=webdriver.chrome(executable_path="C:\\Users\\LENOVO\\Downloads\\chromedriver_win32\\chromedriver.exe")
TypeError: 'module' object is not callable
what to do??
such gold