Codectionary / Developer documentation / Python

Create a Python project with a chosen interpreter and run your code in the IDE’s output window.

Install PyCharm

Instructions checked 18 October 2026 against the official documentation linked below. Menu labels may differ between releases; verify the selected interpreter rather than relying only on its display name.

PyCharm is an integrated development environment with editing, run configurations and debugging. Current releases are a unified product: core functionality remains free, with additional Pro features. Check the official download and system requirements rather than looking for an old Community installer.

Install through the official download or JetBrains Toolbox. PyCharm’s bundled Java runtime runs the IDE itself; it is not a Python interpreter. Install Python first, or use the documented Python download option when creating a project if offered.

Create a project and environment

  1. From the welcome screen choose New Project, then a Pure Python project. Select a writable python-practice folder.
  2. Use Project venv for an isolated environment. Check its base Python version. Under a custom environment you can instead select an existing .venv executable.
  3. If Python is not detected, provide the installed executable path or use the Python download option. Create the project after confirming the interpreter.
  4. In the Project view, create a Python File named hello.py. Enter the first program below and save it.

Run and check the interpreter

Right-click hello.py and choose its Run action. Hello, Python! should appear in the Run tool window. A run configuration identifies the script and interpreter; it is not the same as executing arbitrary commands in the Terminal panel.

Use the interpreter selector or Settings → Python → Interpreter to inspect or change the project interpreter. Run the diagnostic below from the project to confirm the executable path.

Python diagnostic — in your file

import sys
print(sys.version)
print(sys.executable)

Common problems

An invalid interpreter usually means its executable was moved, removed or never installed. Select a working interpreter and recreate .venv if its base installation changed.

For missing packages, install into the selected project environment through the interpreter’s package tooling or its python -m pip. Check the terminal’s active environment separately.

If Run opens an older script, select the hello.py run configuration or run the file from its context menu. For file-not-found errors inside code, check the run configuration’s working directory. You do not need paid remote-development features to follow this local guide.

Syntax

print("Hello, Python!")

Examples

Your first Python program

Save as hello.py in your project folder. Expected output: Hello, Python!

print("Hello, Python!")
  1. print is a built-in function that writes to the output stream.
  2. The quoted text is a string. The quotes are not printed.
  3. Parentheses pass that string to print. No extra package is required.

Best practices

  • Save your work before running it, and check the output after each small change.
  • Keep your learning project in its own folder. Do not name files after standard modules such as random.py or json.py.

Runtime & versions

Python interpreter. Feature availability depends on the language and runtime version used by your project; consult the official reference below.

Python language reference

Specifications & further reading