Instalar Python

Por lo tanto, probablemente se esté diciendo a sí mismo: “Python suena tan bien, ¡estoy listo para codificar!” Antes de que pueda hacer algo con Python en su computadora, debe instalar la última versión del idioma. ¿Listo para comenzar? ¡Vamos!

Descarga Python

Aquí están las instrucciones para descargar Python según su plataforma.

Plataforma Windows

Si está usando una computadora que ejecuta Windows, puede descargar Python desde Microsoft Store. En la barra de búsqueda, ingrese Python y seleccione la última versión del idioma.

Captura de pantalla que muestra la versión de Python 3.7 en la barra de búsqueda de Microsoft Store cuando se usa Windows, para descargar Python de Microsoft Store.

Additional information about the language is provided in the Overview section. If you’re unsure about whether your computer meets the requirements to install Python, check out the System Requirements section. Once you’re all set, click the Get button to start the download.

After the download is complete, follow the instructions in the installation wizard to install Python. When prompted, be sure to check the box Add Python 3.7 To PATH (your version number may differ).

Unix Platform (macOS or Linux)

If you’re using a Mac or a computer running Linux, it’s likely that your computer already has an outdated version of Python installed. You will run into problems using earlier versions of Python (Python 2.x or older) while completing the exercises in this book. Therefore, head over to www.python.org to download and install the latest version of the language.

After the download is complete, follow the instructions in the installation wizard to install Python.

Check the Python Version

Now that you’ve installed Python, you can check the version of the language using the terminal. A terminal is a program that you can use to communicate with your computer. In the terminal, you enter commands, which are instructions for the computer to follow. If the computer doesn’t understand a command, it’ll respond with an error message.

Windows Platform

On Windows, you can use the Command Prompt window (which is a terminal) to check the Python version installed. Search for the Command Prompt app to open the terminal.

Screenshot of a Command Prompt to check the Python version installed with an default information ending with a blinking line to write the Command.

At start, the Command Prompt window loads with default information. Below the default information, you’ll see a line that ends with a blinking line. This blinking line, also known as a text cursor, is an indicator that the terminal is ready for you to enter a command.

To check the version of Python installed, enter the command python3 –version and press Enter.

Screenshot of a Command prompt confirming installation, enabling the system that is ready to code.

If the version of Python installed is 3.x or newer, then you’re all set to code!

Unix Platform

En una Mac o una computadora con Linux, busque terminal para abrir la terminal.

Illustration depicting a Unix platform on a Mac or a computer running on Linux with a default information and a line that ends with a $ symbol which  is an indicator that the terminal is ready to enter a command.

Al inicio, el terminal se cargará con la información predeterminada. Debajo de la información predeterminada, verá una línea que termina con un símbolo $ . Este símbolo, o cursor de texto , es un indicador de que el terminal está listo para que ingrese un comando.

Para verificar la versión de Python instalada, ingrese el comando python –version y presione Enter.

Illustration depicting the version of the Python installed which is 3.X or more than the system is ready to code.

Si la versión de Python instalada es 3.xo más reciente, ¡ya está todo listo para codificar!