КурсыPython StartУрок 1: Установка Python
Модуль 1Урок 1: Установка Python

Установка Python (Python Installation and Environment Setup)

Словарь урока (Lesson Vocabulary)

  • installation — установка
  • environment — окружение
  • setup — настройка
  • version — версия
  • download — скачать
  • path — путь
  • command line — командная строка
  • interpreter — интерпретатор

Введение (Introduction)

Прежде чем мы сможем начать программировать на Python, нам необходимо установить его на наш компьютер. В этом уроке мы шаг за шагом пройдем процесс установки Python и настройки среды разработки.

Before we can start programming in Python, we need to install it on our computer. In this lesson, we will go through the process of installing Python and setting up the development environment step by step.

Какую версию Python выбрать? (Which Python Version to Choose?)

На сегодняшний день существует две основные версии Python: Python 2 и Python 3. Python 2 больше не поддерживается с 2020 года, поэтому мы будем использовать Python 3, который является современной и активно развивающейся версией.

There are two main versions of Python available today: Python 2 and Python 3. Python 2 is no longer supported as of 2020, so we will be using Python 3, which is the modern and actively developed version.

Интересный факт (Fun Fact)

Название языка Python происходит вовсе не от змеи, а от британской комедийной группы "Монти Пайтон" (Monty Python), которую очень любил создатель языка Гвидо ван Россум.

The name Python comes not from the snake, but from the British comedy group "Monty Python," which the creator of the language, Guido van Rossum, was a big fan of.

Установка Python (Installing Python)

Для Windows

  1. Перейдите на официальный сайт Python (python.org/downloads).
    Go to the official Python website.
  2. Нажмите на кнопку "Download Python 3.x.x" (где x.x — последняя доступная версия).
    Click the "Download Python 3.x.x" button (where x.x is the latest available version).
  3. Запустите скачанный файл установки.
    Run the downloaded installation file.
  4. Убедитесь, что опция "Add Python to PATH" отмечена галочкой, затем нажмите "Install Now".
    Make sure the "Add Python to PATH" option is checked, then click "Install Now".
  5. Дождитесь завершения установки и нажмите "Close".
    Wait for the installation to complete and click "Close".

Для macOS

  1. Перейдите на официальный сайт Python (python.org/downloads).
    Go to the official Python website.
  2. Нажмите на кнопку "Download Python 3.x.x" (где x.x — последняя доступная версия).
    Click the "Download Python 3.x.x" button (where x.x is the latest available version).
  3. Откройте скачанный файл .pkg и следуйте инструкциям установщика.
    Open the downloaded .pkg file and follow the installer instructions.
  4. Нажмите "Continue" несколько раз, затем "Install".
    Click "Continue" several times, then "Install".
  5. Введите пароль администратора, если потребуется.
    Enter your administrator password if required.
  6. После завершения установки нажмите "Close".
    After the installation finishes, click "Close".

Для Linux

В большинстве дистрибутивов Linux Python 3 уже предустановлен. Чтобы проверить это, откройте терминал и введите:
Python 3 is already pre-installed on most Linux distributions. To check this, open a terminal and type:

python3 --version

Если Python не установлен, вы можете установить его с помощью менеджера пакетов вашего дистрибутива:
If Python is not installed, you can install it using your distribution's package manager:

Для Ubuntu или Debian:

sudo apt update sudo apt install python3 python3-pip

Для Fedora:

sudo dnf install python3

Для Arch Linux:

sudo pacman -S python

Проверка установки (Verifying Installation)

Чтобы убедиться, что Python был успешно установлен, откройте командную строку (терминал) и введите:
To verify that Python was successfully installed, open a command line (terminal) and type:

python --version

или
or

python3 --version

Вы должны увидеть версию Python, похожую на "Python 3.x.x".
You should see a Python version like "Python 3.x.x".

Установка редактора кода (Installing a Code Editor)

Хотя Python поставляется со встроенной средой программирования IDLE, для более удобной разработки рекомендуется установить специализированный редактор кода:
Although Python comes with a built-in IDLE programming environment, it's recommended to install a specialized code editor for more convenient development:

  • Visual Studio Code — бесплатный, мощный редактор кода от Microsoft с отличной поддержкой Python (code.visualstudio.com)
    Visual Studio Code - free, powerful code editor from Microsoft with excellent Python support
  • PyCharm — профессиональная IDE специально для Python, имеет бесплатную Community версию (jetbrains.com/pycharm)
    PyCharm - professional IDE specifically for Python, has a free Community version
  • Jupyter Notebook — интерактивная среда для Python, отлично подходит для обучения и анализа данных
    Jupyter Notebook - interactive environment for Python, great for learning and data analysis

Подведение итогов (Summary)

В этом уроке мы:
In this lesson, we:

  • Узнали о различных версиях Python
    Learned about different Python versions
  • Установили Python 3 на нашу операционную систему
    Installed Python 3 on our operating system
  • Проверили успешность установки
    Verified the installation was successful
  • Рассмотрели различные редакторы кода для работы с Python
    Explored various code editors for working with Python

Теперь у вас есть все необходимое, чтобы начать программировать на Python! В следующем уроке мы напишем нашу первую программу.
Now you have everything you need to start programming in Python! In the next lesson, we'll write our first program.

Проверь себя (Check Yourself)

  1. Какую версию Python следует использовать для новых проектов?
    Which Python version should be used for new projects?
  2. Почему важно отметить галочку "Add Python to PATH" при установке на Windows?
    Why is it important to check "Add Python to PATH" when installing on Windows?
  3. Какие команды можно использовать для проверки версии Python в терминале?
    What commands can be used to check the Python version in the terminal?
  4. Назовите хотя бы два редактора кода, которые хорошо подходят для разработки на Python.
    Name at least two code editors that are well-suited for Python development.

Практические задания (Practice Tasks)

Какая версия Python является современной и активно поддерживаемой? (Which Python version is modern and actively maintained?)

Что нужно обязательно отметить при установке Python на Windows? (What must be checked when installing Python on Windows?)

Как проверить версию Python в командной строке? (How to check Python version in command line?)