It's time to prepare your environment for Python.
To Install Python, you should have administrator rights.
Now, this is the only section where we will advise you not to read the complete tutorial. Instead, read the part related to your Operating System.
Please click on the link for your operating system
Python installation on Windows
1. Get the Python:
The best way to get Python is from its official website https://www.python.org/downloads/. We recommend you to download the latest version, i.e., Python 3.6.4
When you click on the highlighted button, prompt will ask you to save the file on your computer.
2. Install the Python:
Double Click on the Python setup. This will open a simple wizard.
Check both the checkboxes, install launcher for all users and Add Python 3.6 path. Agree to the Terms and Conditions and follow instructions for installation.
Python will be installed on Windows.
3. Launching Python:
Python can be launched by using IDLE and command prompt.
- Using IDLE: Press windows button, type IDLE and hit Enter
- Using command prompt: Being the command prompt with Windows Button + R, type cmd and hit enter. On the command prompt, type python and hit enter
Python installation for Mac OS X:
1. Get the Python:
The best way to get Python is from its official website https://www.python.org/downloads/. We recommend you to download the latest version, i.e., Python 3.6.4
When you click on the highlighted button, prompt will ask you to save the file on your computer.
2. Install the Python:
Double Click on the Python setup. This will open a simple wizard.
Agree to the Terms and Conditions and follow instructions for installation.
3. Launching Python:
Python can be launched by using IDLE and command prompt.
- Using IDLE: Go to Search type IDLE and hit Enter.
- Using Terminal: Open Terminal, type python, and hit enter
3. Python installation on Ubuntu:
1. Get the Python:
The best way to get Python is from its official website https://www.python.org/downloads/. We recommend you to download the latest version, i.e., Python 3.6.4
When you click on the highlighted button, prompt will ask you to save the file on your computer.
2. Install Python:
If you have saved the tar.xz file in Download folder, then you can directly proceed with the following steps.
Open the terminal and Type following commands:
cd Downloads/ | |
tar xf Python-3.6.4.tar.xz | |
cd Python-3.6.4 | |
./configure | |
sudo make | |
sudo make install |
3. To launch Python: Open the terminal and type Python3
For Ubuntu, you can use vim or nano editor
Key Takeaways:
- We installed latest 3.6.4 version of Python in our system.
- We can use IDLE or our command Prompt/Terminal for Launching Python.
For now, you should be ready to move ahead by now. Will see you in next chapter where we will introduce you to basic syntax of Python by understanding some interesting situation in Daniel’s Startup.