Tutorials  /  Python

Install and Use Python on Windows with Pip and Virtual Environments

Ccentron Redaktion · October 2025 ·5 min read ·Python, Tutorial

After successfully installing Python on Windows using any of the supported methods, you can start executing Python commands and scripts. Python can be run through Windows PowerShell, Command Prompt, or an IDE such as IDLE or VSCode. Follow the steps below to use Python effectively on Windows.

Run Python in PowerShell

Open the Windows PowerShell to verify that Python is correctly installed.

Step 1: Check Active Python Version

Code
> python --version

Step 2: Open the Python Shell

Code
> python

Step 3: Run a Simple Python Command

Print a message using Python:

Code
>>> print("Greetings from centron")

Expected Output:

Code
Greetings from centron

Step 4: Exit the Python Shell

Code
>>> exit()

Step 5: Create and Run a Python Script

Create a simple script named hello.py and execute it:

Code
> "print('Greetings from centron!')" > hello.py
> python hello.py
VM

Matching infrastructure at centron

Scripts and services eventually need an environment that keeps running: ccloud³ VMs from €3.12 per month, billed by the hour. Rent a cloud server →

Use IDLE to Run Python Code

Python includes IDLE, a built-in GUI-based development environment for writing and testing Python code. Follow the steps below to run Python scripts using IDLE.

  1. Open the Windows Start menu, search for IDLE, and open it.
  2. Verify that the Python shell appears, then run the following command:
Code
>>> print("Greetings from centron")

Expected Output:

Code
Greetings from centron

To create and execute scripts in IDLE:

  • Click File → New File to open a new editor window.
  • Write your Python code.
  • Press Ctrl + S to save it with a .py extension.
  • Press F5 to execute the file.

Create and Manage Virtual Environments

Python virtual environments help isolate dependencies for each project, avoiding conflicts between packages. Follow the steps below to install and use virtual environments in Windows.

Step 1: Check the Default Python Version

Code
> python --version

Expected Output:

Code
Python 3.13.3

Step 2: Install the virtualenv Module

Code
> python -m pip install virtualenv

To install it for a specific version, such as Python 3.12:

Code
> python3.12 -m pip install virtualenv

Step 3: Create a Virtual Environment

Create a new virtual environment named venv:

Code
> python -m virtualenv venv

Step 4: Activate the Virtual Environment

Code
> venv\Scripts\activate

Your terminal should now display the virtual environment name in parentheses:

Code
(venv) PS C:\path\to\your\project>

Step 5: Install Packages with Pip

Use Pip to install a package such as requests:

Code
> pip install requests

Step 6: List Installed Packages

Code
> pip list

Expected Output:

Code
Package            Version
------------------ ---------
certifi            2025.1.31
charset-normalizer 3.4.1
idna               3.10
pip                25.0.1
requests           2.32.3
urllib3            2.3.0

Step 7: Deactivate the Virtual Environment

Code
> deactivate

Upgrade Pip on Windows

Pip, Python’s package manager, is usually included with Python installations. However, if you’re managing multiple Python versions, it may require manual upgrades. Follow the steps below to verify and upgrade Pip.

Step 1: Check Pip Version

Code
> pip --version

Expected Output:

Console
pip 24.3.1 from C:\Python313\Lib\site-packages\pip (python 3.13)

Step 2: Upgrade Pip

Code
> python -m pip install --upgrade pip

Step 3: Verify the Upgrade

Code
> pip --version

Expected Output:

Console
pip 25.0.1 from C:\Python313\Lib\site-packages\pip (python 3.13)

Conclusion

You have installed Python and Pip on Windows using both terminal and GUI methods. You can now use Python to create virtual environments, develop applications, and run scripts through IDEs or PowerShell. For more details and advanced configuration options, visit the official Python documentation.

Jetzt 200 € Guthaben sichern

Testen Sie Ihr Setup auf ccloud³

Registrieren Sie sich in der ccloud³ und erhalten Sie 200 € Startguthaben für Ihr Projekt – z. B. für eine PostgreSQL-VM mit automatischen Backups.

centron Redaktion Technische Redaktion

Das Redaktionsteam von centron schreibt Anleitungen aus dem Betriebsalltag: getestet auf unserer eigenen Plattform, betrieben im Rechenzentrum in Hallstadt bei Bamberg.

Kategorie Python
Teilen
Noch offene Fragen?

Unser Team hilft Ihnen bei Ihrem konkreten Setup weiter – von Menschen, die die Plattform selbst betreiben.

War dieses Tutorial hilfreich?

Ihre Antwort wird anonym gespeichert und hilft uns, die Tutorials zu verbessern.

Kommentare

Noch keine Kommentare – stellen Sie die erste Frage zu diesem Tutorial.

Zum Kommentieren anmelden

Kommentare stehen centron-Kunden offen. Melden Sie sich in Ihrem Konto an, um eine Frage zu diesem Tutorial zu stellen.

Weiterlesen

Das könnte Sie auch interessieren

Jetzt kostenlos anfangen

Melden Sie sich an und erhalten Sie in den ersten 60 Tagen ein Guthaben von 200 € bei centron.

Dieses Werbeangebot gilt nur für neue Konten. Angebot ausschließlich für Gewerbetreibende.

Jetzt loslegen Sales kontaktieren