How to Install Python and PIP on Windows
Python is a versatile language for web development, automation, and data analysis. This guide simplifies installing Python and PIP (Python Package Installer) on Windows, with clear examples to help you start coding efficiently, whether for local projects or deploying on AvaHost’s servers.
Introduction
Installing Python and PIP on Windows enables you to manage libraries and run scripts for various applications. This guide ensures a smooth setup, verified with practical commands, and integrates tips for using Python with AvaHost’s hosting environment.
Download Python Installer
- Open your browser and go to the official Python website.
- Click on the latest stable version of Python available (preferably Python 3.x).
- Download the Windows Installer (64-bit) unless your system specifically requires the 32-bit version.
Install Python on Windows
- Locate the downloaded
python-3.x.x.exefile in yourDownloadsfolder. - Double-click the installer to launch the installation wizard.
- Important: Check the box “Add Python to PATH” before proceeding.
- Click Install Now and wait for the installation to complete.
- Once the installation finishes, click Close.
To verify that Python was installed successfully, open Command Prompt (cmd) and run:
python --versionIf installed correctly, it should output something like:
Python 3.x.xVerify and Install PIP
PIP (Python Package Installer) is included by default with most versions of Python 3. To check if PIP is installed, run:
pip --versionIf you see an output like:
pip 21.0.1 from C:\Users\YourUser\AppData\Local\Programs\Python\Python39\lib\site-packages\pip (python 3.9)PIP is already installed.
If PIP is missing, install it manually using:
python -m ensurepip --default-pipTo upgrade PIP to the latest version, use:
python -m pip install --upgrade pipUsing PIP to Install Python Packages
Once Python and PIP are set up, you can install additional Python libraries using PIP. Here are some examples:
Installing a Package
To install a package (e.g., NumPy for numerical computing), run:
pip install numpyInstalling Multiple Packages
If you need multiple packages, list them in a requirements.txt file and install them using:
pip install -r requirements.txtChecking Installed Packages
To see a list of installed packages, use:
pip listUninstalling a Package
To remove a package, run:
pip uninstall numpyRunning Python Scripts
To execute a Python script, follow these steps:
- Open a text editor (e.g., Notepad++ or VS Code) and create a new file.
- Write your Python code, for example:
print("Hello, Python on Windows!") - Save the file as
hello.pyin a convenient location. - Open Command Prompt and navigate to the directory where you saved the file using
cd:cd path\to\your\file - Run the script with:
python hello.pyYou should see:
Hello, Python on Windows!
Conclusion
Congratulations! You have successfully installed Python and PIP on your Windows machine. You are now ready to explore the world of Python programming and install additional libraries as needed. Whether you’re working on data science, web development, or automation, Python is a great tool to have at your disposal.
If you ever encounter issues, you can refer to the Python documentation at https://docs.python.org/ or use community resources like Stack Overflow to get help.


