Install Python
Tags: python, beginners
Published: 2020-03-05 23:45:27

Python is installed by default on Mac OS X or Linux. But you may want to use Windows or install another version of Python. In this article we'll cover several things:

* Python installation
* Installation of Linux systems
* windows system installation
* Installation of Mac OS X systems
* Install with ActivePython

# Python installation

The things that you need to install are all in this page: 
www.python.org/downloads/

Download the newest Python from there.

If you are new to Python, you may like the <a href="https://gumroad.com/l/dcsp">Python crash course</a>

## Installation of Linux systems

Python is cross-platform. It is already installed by default on most Linux distributions.

If you have to install it yourself, you can use your package manager to install it. On Ubuntu you can use apt-get:

```
sudo apt-get update
sudo apt-get install python3.6
```

### From source 

If you like to *do things the hard way*:

* Download source code from the website
* Decompression source pack

```bash
tar -zxvf Python-3.7.0.tgz
```

* Compile

```bash
cd Python-3.7.0 ./configure -prefix=/usr/local make && make install
```

After the installation is good, enter the shell and type python and see the following:

```python    
$ python3
Python 3.7.5 (default, Nov 20 2019, 09:21:52) 
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
```
 
Congratulations, the installation was successful.



## Installation of windows systems

Go to (https://www.python.org/downloads/) find the windows installation package, download, for example, download this file: python-3.7.0.msi. Then it is a constant "next step" to complete the installation.

After installation, you need to check whether there is python in the environment variables.

> If you don't know what is a windows environment variable and how to set it. Don't worry, search: "windows environment variable" on google.

The above is done. In cmd, enter python and you should see something like this:

```python    
$ python3
Python 3.7.5 (default, Nov 20 2019, 09:21:52) 
[GCC 9.2.1 20191008] on windows
Type "help", "copyright", "credits" or "license" for more information.
>>> 
```

## Installation of Mac OS X systems

In general, the Mac OS x systems have already installed a version of python, which can be used. If you want another, you can use brew. 

But windows Python are definitely not installed.

In addition to the installation of the method mentioned above, there is also a more provincial approach, which is to install: ActivePython

## Install with ActivePython

This ActivePython is a Python suite of several operating systems that includes a complete Python release, a Python programming IDE, and some Python. If interested visit their official website at : http://www.activestate.com/activepython

## Use Source Installation

python is open-source and its source code is all online. You can <https://www.python.org/ftp/python/>, download the source code.

Then run these commands in the shell:

1. Access root
2. Download some version of python to the above address: wget <https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz>
3. Extract: 
```bash
tar xfz Python-3.7.0.tgz
```
4. Enter the directory: 
```bash
cd Python-3.7.0
```
5. Configuration: 
```bash
./configure
```
6. Run in the above folder: `make`, then run: `make install`
7. Good luck
8. Installation completed

OK! After you have installed it, you can start programming right away.

**Related links:**
* <a href="https://gumroad.com/l/dcsp">Python crash course</a>
* <a href="https://pythonbasics.org">Learn Python</a>