6. Installing and Configuring PyCharm
1. Introduction
PyCharm is a popular Integrated Development Environment (IDE) created by JetBrains.
It comes in two editions:
- Community Edition (free, open-source) → ideal for beginners.
- Professional Edition (paid) → adds advanced features such as web development and database tools.
For most learners, the Community Edition is sufficient.
2. Downloading PyCharm
- Open your web browser.
- Go to the official PyCharm download page:
https://www.jetbrains.com/pycharm/download/ - Choose your operating system (Windows, macOS, Linux).
- Download the Community Edition installer.
3. Installing on Windows
- Run the
.exeinstaller. - Follow the setup wizard:
- Choose installation location.
- (Optional) Create a desktop shortcut.
- ✅ Check Add "Open Folder as Project" option.
- ✅ Add to PATH (recommended).
- Click Install and wait for the installation to finish.
- Launch PyCharm from the Start Menu.
4. Installing on macOS
- Open the
.dmgfile you downloaded. - Drag PyCharm CE.app into the Applications folder.
- Open it via Spotlight or Launchpad.
- (Optional) Add
charmcommand to PATH for opening projects from Terminal:- Open PyCharm.
- Go to Tools → Create Command-line Launcher.
- Accept default settings.
5. Installing on Linux
For Ubuntu/Debian:
sudo snap install pycharm-community --classic
For Fedora/RHEL (if Snap not available, use tarball):
sudo tar -xzf pycharm-community-*.tar.gz -C /opt/
cd /opt/pycharm-community-*/
bin/pycharm.sh
For Arch:
yay -S pycharm-community-edition
6. Initial Setup
- Start PyCharm for the first time.
- Choose a theme (Light or Dark).
- (Optional) Import settings if you used PyCharm before.
- Configure font size and keymap if desired.
7. Configuring Python Interpreter
- Create a new project or open an existing folder.
- PyCharm will prompt you to set a Python interpreter.
- Choose one of the following:
- Existing interpreter → Use the system Python you installed earlier.
- Virtual environment → PyCharm can create one for your project.
- Confirm the interpreter path (e.g.,
python3.12).
8. Creating Your First Project
- From the welcome screen, click New Project.
- Enter a project name (e.g.,
HelloPython). - Choose the interpreter.
- Click Create.
- Inside the project, create a new Python file:
- Right-click project folder → New → Python File.
- Name it
hello.py.
- Type:
print("Hello from PyCharm!")
- Right-click the file and choose Run 'hello'.
- The output will appear in the Run window:
Hello from PyCharm!
9. Customizing PyCharm
- Themes and Fonts: Settings → Appearance & Behavior → Appearance.
- Keymaps: Choose from IntelliJ, VS Code, or custom keybindings.
- Plugins: Explore useful plugins (e.g., Markdown support, Git tools, database tools).
10. Troubleshooting
- Interpreter not found: Double-check Python is installed and added to PATH.
- PyCharm feels slow: Increase memory in
Help → Change Memory Settings. - Projects not opening: Try deleting
.ideafolder in project directory and reopen.
11. Next Steps
✅ You now have PyCharm installed and configured.
In the next chapter, we will set up Jupyter Notebook, an interactive environment widely used in data science.