Now that we know what python is, what we need to do by for now is to have python to run on our computer.
Python is bordered on its Python Official Page; however, to get us started, lets follow the step by step installation process below to get us all set.
>>> python -V
Hey sir, wait! what if I am running linux on my machine?
Is that sounding familiar to you, then I'll be of help; Just scroll a little down.
In fact, by default, Linux comes with a pre-installed python ready for you. But incase you have to install it anyway, then you this is for you.
Installing Python on a Linux machine is just different than that of windows and is a matter of running few commands.
Below is a step-by-step guide on how you would install Python on your Linux machine.
Before you can install python on Linux, prepare your machine for installation by running the following commands:
User@hostname$ sudo apt-get install build-essential checkinstall
User@hostname$ sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
User@hostname$ cd /usr/src
User@hostname$ sudo wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz
User@hostname$ sudo tar xzf Python-3.7.2.tgz
User@hostname$ sudo ./configure --enable-optimizations
User@hostname$ sudo make altinstall
We have looked on how we would possibly install python on windows and Linux Operating systems respectively, and now lets mess around with Mac...
Hey sir, what did you say...? Yes, we are going to mess around with Mac; sorry I mean play around! hahahahah.
Just as with Linux that we had to prepare our Machine before installing Python, the same is true with Mac.
In Mac, the first thing we need to install is GCC, which can be obtained by downloading a Command Line Tool on Mac, the giant XCode.
$ xcode-select --install
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
to add homebrew to /home/usr/.profile
file.$ brew install python
Reaching this point, I assume we all have python installed in our Machines. Let's check if we were successful with the installation.
We can do so by running the command below in our terminal or commandline:
$ python --version
This will show you python version you're running on your machine.
I hope we're now on the good pos to get started