How to Install Python - The Right Way

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i'm going to show you how to install python and i'm going to answer that question for you should you add python to your path there are quite a few different ways that you can install python and i think that can add to the confusion in this video we're going to be concentrating on the official installation of python but hold on just one second before we install python we just need to double check that you don't have it already installed on your computer because if you do that can cause a few problems we'll do that now okay so let's see if python is installed and we're going to do that by opening up the power shell so just press the windows key on your keyboard or go to the magnifying glass in the taskbar type in powershell click open that will open up this window here and i'd like you to type python followed by a space and then hyphen hyphen version so there you can see i have python installed and if you don't have python installed well something else will happen so you'll end up here if you don't have it installed there's nothing fundamentally wrong with the microsoft store version of python it just is a little bit restrictive and so as you progress and want to do more things with python then you might not find it gives you all the functionality that you need so that's why i think you should install the official version from the python website which is what we're going to do now you want to go to python.org hover over the downloads menu item at the top and you'll see the download for windows button click on the button and wait for it to download and now you're pretty much good to go incidentally there's a lot of useful information on the python website so it's worth exploring that at some point but not now because we're going to carry on with the installation so go to wherever you downloaded the file double click on it and then this happens what does that mean why is there no guidance in this little bit where it says add to path let's talk about that you can launch applications from the command line or from powershell and you do that by typing in a command so for example if you want to launch notepad you just type notepad into the command line or powershell and that will launch the application or you can do the same with excel you just type excel but how does windows know that when you type notepad it won't you want it to launch the notepad or the same with excel well it knows that because you add it to the path so when you add python to the path you're essentially telling the installer to create a shortcut so that when you type python into the command line or powershell python will launch so in most cases you want to add python to your path but not always and the time you don't want to add python to your path is if you've previously installed python and added it to your path before because you don't want to end up with lots of different versions of python all added to your path actually that is a situation that can be managed but it's not very beginner friendly so assuming that you don't have it added to your path already or installed you can now in the installation process you can click add python to my path and go ahead and install python and once it's installed you should be good to go there's one more thing though that i advise you do and that is to check out virtual environments because if you start coding in python and don't set up virtual environments that can become a little bit messy as you start to do projects further down the line and you'll wish that you'd installed and set up virtual environments so check out my video on virtual environments now i want to tell you about today's sponsor replit now with replit you don't have to install python onto your computer at all because you can just code in the browser let me show you what i mean with replit you get an in-browser ide that means you can just code in your browser you don't have to worry about installing python onto your machine in fact you can code from any type of computer or device that you like replica supports over 50 languages so you can code in python but you can code in other languages too there are a whole load of other features that you wouldn't get just by installing python onto your computer there's real time collaboration you can work with friends and teammates there's github integration so you can import run and collaborate on millions of github repos you can host and deploy your projects with replied and there are learning resources too you can sign up for free where you'll get unlimited replies free storage up to 500 megabytes and the link is in the description
Info
Channel: Python Programmer
Views: 173,476
Rating: undefined out of 5
Keywords: python, how to learn python, python for beginners, how to install python, python for windows, giles mcmullen, how to code, learn to code
Id: YKSpANU8jPE
Channel Id: undefined
Length: 4min 59sec (299 seconds)
Published: Fri Jun 03 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.