Установка 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
- Перейдите на официальный сайт Python (python.org/downloads).
Go to the official Python website. - Нажмите на кнопку "Download Python 3.x.x" (где x.x — последняя доступная версия).
Click the "Download Python 3.x.x" button (where x.x is the latest available version). - Запустите скачанный файл установки.
Run the downloaded installation file. - Убедитесь, что опция "Add Python to PATH" отмечена галочкой, затем нажмите "Install Now".
Make sure the "Add Python to PATH" option is checked, then click "Install Now". - Дождитесь завершения установки и нажмите "Close".
Wait for the installation to complete and click "Close".
Для macOS
- Перейдите на официальный сайт Python (python.org/downloads).
Go to the official Python website. - Нажмите на кнопку "Download Python 3.x.x" (где x.x — последняя доступная версия).
Click the "Download Python 3.x.x" button (where x.x is the latest available version). - Откройте скачанный файл .pkg и следуйте инструкциям установщика.
Open the downloaded .pkg file and follow the installer instructions. - Нажмите "Continue" несколько раз, затем "Install".
Click "Continue" several times, then "Install". - Введите пароль администратора, если потребуется.
Enter your administrator password if required. - После завершения установки нажмите "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)
- Какую версию Python следует использовать для новых проектов?
Which Python version should be used for new projects? - Почему важно отметить галочку "Add Python to PATH" при установке на Windows?
Why is it important to check "Add Python to PATH" when installing on Windows? - Какие команды можно использовать для проверки версии Python в терминале?
What commands can be used to check the Python version in the terminal? - Назовите хотя бы два редактора кода, которые хорошо подходят для разработки на Python.
Name at least two code editors that are well-suited for Python development.