Step 1: Install Python
Download the latest version of Python for your operating system from the official Python website. On Windows, be sure to tick “Add Python to PATH” before installing.
Linux quick install
# Debian/Ubuntu
sudo apt update && sudo apt install -y python3 python3-pip
# Fedora/RHEL
sudo dnf install -y python3 python3-pip
# Arch
sudo pacman -S python python-pip
Step 2: Verify installation
Open a terminal (Command Prompt/PowerShell on Windows) and check versions:
python --version # or: python3 --version
pip --version # or: pip3 --version
If these commands return versions (e.g., Python 3.12.x), you’re good to go.
Step 3: Set up PyCharm
PyCharm is a powerful Python IDE with smart code completion and robust debugging.
- Install: Download from the PyCharm site (Community edition is free).
- Create a project: New Project → choose a folder. Ensure the interpreter is set to your Python install.
- Configure: File → Settings to tweak theme, font, and code style.
# Try running this in PyCharm once your project is ready:
print("PyCharm is set up!")
Step 4: Set up VS Code
VS Code is a lightweight editor made powerful by extensions.
- Install: Get it from the VS Code website.
- Extensions: Install Python (Microsoft) and Pylance for IntelliSense.
- Select interpreter: Ctrl/Cmd + Shift + P → “Python: Select Interpreter”.
# In VS Code's terminal, you can also verify:
python -V && pip -V
Step 5: Test with hello.py
Create a file called hello.py and add:
print("Hello, World!")
Run it from a terminal:
python hello.py # or: python3 hello.py
You should see Hello, World! 🎉
Troubleshooting & tips
- Command not found? Close/reopen your terminal, or ensure Python is on PATH (Windows installer option).
- Multiple Pythons? Prefer
python3/pip3on macOS/Linux. - Permissions on Linux? Use
sudowhen required or install user-local withpip install --user.