0% found this document useful (0 votes)
22 views

Step-By-Step Instructions For Installing Python

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Step-By-Step Instructions For Installing Python

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

For Windows

1. Download the Python Installer

1. Go to the official Python website: https://www.python.org/downloads/.


2. Click the "Download Python" button to download the latest version of Python. The
installer should automatically detect your operating system and provide the
appropriate version.

2. Run the Installer

1. Locate the downloaded installer file (usually in your Downloads folder) and double-
click to run it.
2. In the installer window, check the box that says "Add Python to PATH" at the bottom.
3. Click on "Customize installation" if you want to choose optional features and the
installation path, or click on "Install Now" for the default installation.

3. Verify the Installation

1. Open the Command Prompt by pressing Win + R, typing cmd, and hitting Enter.
2. In the Command Prompt, type:

python --version

This should display the installed version of Python.

For macOS

1. Download the Python Installer

1. Go to the official Python website: https://www.python.org/downloads/.


2. Click the "Download Python" button to download the latest version of Python for
macOS.

2. Run the Installer

1. Locate the downloaded installer file (usually in your Downloads folder) and double-
click to open it.
2. Follow the prompts in the installer to complete the installation. This usually involves
agreeing to the license, selecting the installation location, and clicking "Install".

3. Verify the Installation

1. Open the Terminal by pressing Cmd + Space, typing Terminal, and hitting Enter.
2. In the Terminal, type:

python3 --version
This should display the installed version of Python. Note that macOS typically comes
with Python 2.x pre-installed, so you need to use python3 to refer to the new
installation.

For Linux

1. Update Package List

1. Open the Terminal.


2. Update your package list with the following command:

sudo apt update

2. Install Python

1. Install Python with the following command:

sudo apt install python3

3. Verify the Installation

1. In the Terminal, type:

python3 --version

This should display the installed version of Python.

Installing pip (if not included)

pipis the package installer for Python, and it is often included with Python installations.
However, if it is not installed, you can do so manually.

For Windows and macOS

1. Download get-pip.py from https://bootstrap.pypa.io/get-pip.py.


2. Open the Command Prompt (Windows) or Terminal (macOS), navigate to the
directory where get-pip.py is located, and run:

python get-pip.py

For Linux

1. Install pip using the following command:

sudo apt install python3-pip

Setting Up a Virtual Environment (Optional)


Creating a virtual environment helps to manage dependencies and avoid conflicts between
packages.

For All Platforms

1. Install virtualenv using pip:

pip install virtualenv

2. Create a virtual environment:

virtualenv myenv

3. Activate the virtual environment:


o On Windows:

myenv\Scripts\activate

o On macOS/Linux:

source myenv/bin/activate

By following these instructions, you should be able to successfully install Python on your
system.

You might also like