How to Install Python on Mac | Install Python on macOS (2024)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys in this video I'm going to show you how you can download and install python on your Mac operating system later in this video I'm also going to show you how you can run a Python program on your Mac operating system so let's get started so to install python first of all open your favorite browser and search for download Python and the first link which will appear here will be from python.org so I'm going to click on this link if you don't see the download button straight up way you can click on uh this download section also and then you will be able to see this uh download python the version at the time of making this video is 3.2.1 so I'm going to just click on this button which is going to start the download of this PKG file it's around 43.3 megabytes so it will be downloaded really fast once it's downloaded just click on this PKG file and let me minimize the browser so as you can see the installation of python has been started on the first window I'm going to just click on continue here and then if you uh want to read the these uh license terms and conditions just uh read this and then click on continue now on the next window you have this read me section so if you want to read this you can read this and then click on continue on the next window we have the license terms and conditions so just read all the license terms and conditions and then click on continue and then you need to agree with the license terms and conditions so click on agree and then we have the installation type so this will take around 176 megabyte of space on your computer click install so I'm going to click on install and then give my uh Max password which I Ed to log to my Mac operating system and then click on on install software it's going to start the installation of this software now here it says installer would like to access files in your downloads folder I will click on okay here which is going to write the files in my downloads folder and once the installation is finished it's going to uh open this kind of finder window where you will see all the tools which are installed so you can see idle is IDE which comes with the python installation so you can open idle you can also open the python launcher application so both these uh applications you will find also in your applications section also so when you click on Launchpad here and then uh when you see here idle is present and python launcher is also present so both are installed right so let me close this window and you can see uh python 3.2.1 for Mac OS is successfully installed so once python is successfully installed I can close this window and then I can move this uh PKG file to the bin because I no longer need it so I'm going to click on move to bin which is going to move this file to the bin once python is installed I can open the terminal again so let me quit the terminal let me open the terminal once again and here I'm going to give this python command so I'm going to give Python 3 and space hyphen hyphen version and then press enter and here I can see the version of python which is python 3.2.1 so python is working now in order to uh get into the python interactive shell you can give uh this command which is Python 3 and then press enter and you will go into the python uh uh repple here you can evaluate uh your python command for example if I write 2 + uh 5 here it's going to give the output I can give a print command so I'm going to just write print and then inside the parentheses and double quotes I can just write hello world here and then press enter and it's going to print hello world so on the python terminal it's working now in order to quit from python repple you can uh give control Zed command or you can uh write quit here and then these two parentheses and you will come out of uh this python repple now we can also uh try the python idle or python launcher so let me click on python launcher and it's going to show you this kind of uh window and here it says settings for uh file type which is python script interpreter and I can run this python launcher in the terminal window right so here I can set the python related stuff for my python uh scripts or for the python Command right so because I have checked this uh checkbox my Python 3 command runs in the terminal also if I check this checkbox it says allow override with hashbang in the script so I can use uh this override with the script I also have other options which I can check which is for debug parser output verbos uh import and other options here if I want to add other flags I can uh use the other flags option also if I want to uh reset all these settings to the factory reset I can just click on reset to factory settings when I go to launcher once again I can also use this idle so I can click on this idle tool and then it says python would like to access files in your documents folder because it's going to create a file in your documents folder so I'm going to click on okay which is going to create a file in my documents folder now here also I can uh evaluate my commands for example 2+ six and it's going to give me the output and also I can uh print any text here so I'm going to just write print and then I can use these double codes and then in the double Cotes I can just write uh hello world here and then press enter and this works right so I can uh use this idle to uh run my python commands now let's say if you have a python file you want to create a python script and then run it so for that we are going to open the terminal once again and then go to the folder where you want to create your python script so so right now I'm in my uh home folder here I'm going to CD into my documents folder and here I'm going to create a new uh directory I'm going to just write mkdir and then I'm going to name my directory as python projects and then press enter and then I'm going to CD into my python projects folder and here I'm going to create a python file so let me just uh open this destination in the finder also so I was in my documents folder in my documents folder I have created this python projects folder right so to create a python script you can give this command which is touch and then your python file name let's say I'm going to name my file as hello.py py is the extension we used with the python file and then press enter it creates this python script right once the script is created you can right click on this hello.py file and then you can click on open with and by default it says idle so just click on idle here and it's going to open this uh file in the python ID right now here I can uh write my python script for example print once again in the parenthesis and in the double quotes hello world and then once uh the script is done I can press command s to save my file or I can press on file and then I can save my file right so I can click on save my uh python script is saved I can close this file and to run this uh script I can just simply run this script by writing simply writing Python 3 and then the name of uh my file is hello. py file so just write Python 3 space the name of your script and then press enter and it's going to print the output of your python script which is Hello World in my case so this is how you can run a python script using the command line or also one more additional tip for you when you install python uh it also comes with the python package manager which is called pip so you can also give this command which is PIP 3 hyphen hyphen version and then press enter and it's going to give you the version of pip later you will be able to uh install python packages which are created by some third party people or some official guys uh in order to uh import them into your python script and then use those packages in your python script so pip is a python package manager which you can use uh to install the third party packages also so this is how you can download and install python on your Mac operating system and uh use it to run your python script I hope you have enjoyed this video and I will see you one more thing you can check here is python
Info
Channel: ProgrammingKnowledge
Views: 134,256
Rating: undefined out of 5
Keywords: Python (Programming Language), Software (Industry), How-to (Website Category), Mac OS X, Mac, Python 3.6, Python, Python 3, macOS, macOS High Sierra, Python 3.x, Install Python, Install Python 3, Python 3 on Mac, How do I run Python on Mac?, How to install Python using terminal?, How to install Python step by step?, Is Python free to download on Mac?, install python on mac m14, brew install python, uninstall python mac, install python 3 on mac, how to start python on mac
Id: nhv82tvFfkM
Channel Id: undefined
Length: 10min 37sec (637 seconds)
Published: Tue Jan 02 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.