To utilize its extensive library ecosystem, it is crucial to have Python installed on your system. Additionally, pip, the package installer for Python, enables you to effortlessly download and manage various Python packages. In this guide, we will walk you through the step-by-step process of installing Python and pip on Windows 10.
Step 1: Download Python:
- Open your preferred web browser and visit the official Python website at python.org.
- On the homepage, click on the “Downloads” tab.
Step 2: Choose the Python Version:
- You will see different versions available for download. Select the version that best suits your needs. It is recommended to choose the latest stable release.
- If you’re unsure, click on the “Downloads” button for the latest Python 3 version.
Step 3: Start the Installation:
- Once the installer file is downloaded, locate it in your downloads folder and double-click on it to start the installation.
- Check the box that says “Add Python to PATH” and click on the “Customize installation” button if you wish to customize the installation further. Otherwise, click on “Install Now.”
Step 4: Customize Installation (Optional):
- If you chose to customize the installation, the Customize Python screen will appear. Here, you can select optional features and customize the installation directory.
- Review the available options and make the desired selections. Click on the “Next” button to proceed.
Step 5: Complete the Installation:
- The installation process will now begin. Wait for it to complete.
- Once the installation is finished, you will see a screen that says “Setup was successful.” Ensure that the box that says “Disable path length limit” is checked. Click on the “Close” button.
Step 6: Verify the Python Installation:
- Open the Command Prompt by pressing the Windows key + R, typing “cmd,” and hitting Enter.
- In the Command Prompt, type “python –version” and press Enter. You should see the installed Python version displayed.
Step 7: Install pip:
- While still in the Command Prompt, type the following command and press Enter:
python -m ensurepip --upgrade
Step 8: Add Python and pip to PATH:
- To use Python and pip from any location in the Command Prompt, you need to add them to the system’s PATH variable.
- Right-click on the Start button and select “System.”
- In the System window, click on “Advanced system settings” on the left-hand side.
- In the System Properties window, click on the “Environment Variables” button.
- In the Environment Variables window, under “System variables,” scroll down to find the “Path” variable and click on “Edit.”
- Click on “New” and add the following two paths, one at a time:
C:\Python39\Scripts
C:\Python39
- Note: Replace “Python39” with the version number you installed if it differs.
- Click on “OK” to save the changes.
Step 9: Verify the pip Installation:
- Open a new Command Prompt window.
- Type “pip –version” and press Enter. You should see the pip version displayed.
Congratulations! You have successfully installed Python and pip on your Windows 10 system. With Python and pip set up, you are now ready to explore the vast world of Python development and leverage its rich ecosystem of libraries and packages. Enjoy coding in Python on your Windows 10 machine!