Installing Python
- Windows
- Ubuntu
- macOS
Download the Python installer for Windows from the official website: https://www.python.org/downloads/windows/
Open the downloaded installer package by double-clicking on it.
Follow the prompts to install Python on your Windows. The installer will guide you through the installation process and install the necessary components.
Make sure to select the option to add Python to the system PATH, this will allow you to use python and pip commands from the command prompt without specifying the full path.
Once the installation is complete, you can open the command prompt and type
python
to open the Python interpreter. You can also typepip
to open the package installer for Python.You can also use IDLE, an integrated development environment that comes with Python, or other IDEs like PyCharm or IDLE to develop and run Python code.
To check the python version installed, you can run
python --version
in command prompt
Open a terminal window and update the package lists by running the command:
sudo apt-get update
Install the Python package by running the following command:
sudo apt install software-properties-common
sudo apt-get install python3This command will install the latest version of Python3 and the additional utilities required to manage the Python3.
Once the installation is complete, you can open the terminal and type
python3
to open the Python interpreter. You can also typepip3
to open the package installer for Python.You can also use IDLE, an integrated development environment that comes with Python, or other IDEs like PyCharm or IDLE to develop and run Python code.
To check the python version installed, you can run
python3 --version
in command prompt.
Download the Python installer for Mac from the official website: https://www.python.org/downloads/mac-osx/
Open the downloaded package file by double-clicking on it. A window will appear with the Python installer.
Follow the prompts to install Python on your Mac. The installer will guide you through the installation process and install the necessary components.
Once the installation is complete, you can open the terminal and type python3 to open the Python interpreter. You can also type pip3 to open the package installer for Python.
You can also use IDLE, an integrated development environment that comes with Python, or other IDEs like PyCharm or IDLE to develop and run Python code.
To check the python version installed, you can run
python3 --version
in command prompttipYou can also install Python via package manager such as Homebrew. This way you will have the latest version and easy way to upgrade and manage the installation.
Python is a powerful and widely-used programming language, known for its simplicity and ease of use. With a large and active community, there are many libraries and frameworks available for various tasks, making it a great choice for beginners and experienced developers alike.
Note that, in Ubuntu/Mac, python2
is still installed in parallel with python3
, so you can use python2
if you want, but it's recommended to use python3
for the new projects as python2
reached end-of-life at the end of 2019.