This section provides descriptions of the Python-specific procedures that are used in projects of all supported types, and the procedures that pertain to the empty projects only.
At least one Python interpreter is properly installed on your machine.
PyCharm supports the following versions of Python:
- Python 2: versions 2.6 and 2.7
- Python 3: from the version 3.4 up to the version 3.7
PyCharm 2018.1 integrates the following features of Python 3.7:
- PEP-544 -- Protocols: Structural subtyping (static duck typing)
- PEP-557 -- Data Classes
- PEP-560 -- Core support for typing module and generic types
- PEP-562 -- Module __getattr__ and __dir__
- PEP-563 -- Postponed Evaluation of Annotations
PyCharm provides support for Python 3.5 and (since 2016.3) Python 3.6, with the backing of the following:
- PEP-484 -- Type Hints
- PEP-448 -- Additional Unpacking Generalizations
- PEP-492 -- Coroutines with async and await syntax
- PEP-526 -- Syntax for variable annotations
- PEP-498 -- Literal String Interpolation
- PEP-515 -- Underscores in Numeric Literals
- PEP-525 -- Asynchronous Generators
- PEP-530 -- Asynchronous Comprehensions
- and more.
Python support in PyCharm includes:
- Dedicated project types .
- Ability to configure local and remote interpreters and virtual environments. .
- Python console.
- Run/debug configurations for Python, and Python remote debug.
- Code insight
- Code inspections.
- Intention actions .
- Code completion and resolve.
- Built-in code formatter and separate set of Python code style settings.
- Find usages in Python code.
- Testing frameworks.
- Quick documentation .
- Recognizing Python documentation comments.
- Documentation generators
- Configuring Python debugger.
Note that the debugger contains speedup modules, which use Cython and are generated with a few changes in the regular files to cythonize the files. The Cython speedups are available for CPython versions 2.7, 3.4 and 3.5.
- On Windows the compiled Cython extensions are bundled with PyCharm.
- On Linux and Mac OS, Cython extensions should be compiled manually in one in two possible ways:
- by clicking the link that appears in the warning after the first debugger launch.
- by running the command from the warning manually in the terminal. A separate Cython extension should be compiled for each version of Python interpreter.
If someone doesn't want to use Cython extensions for some reasons, the environment variable
PYDEVD_USE_CYTHON=NOshould be passed.
- UML Class diagrams for Python classes.