Installation and use of Python


This article mainly introduces the installation of python, a computer language, and how to use it.

Python installation

There is nothing to say about Python installation. Go to Python’s official website , select downloads. If you don’t like the latest version, you can also download other historical versions. But I don’t recommend such an operation.

Installation and use of Python

Because there are many versions of windows on the official website, it is difficult for many friends who are not programmers to choose. And we just use Python as our tool for data analysis and automatic calculation, not really programming, so I recommend you to install Anaconda (Python distribution) python.

Anaconda is suitable for windows, Linux and MacOS systems to simplify package management. Let me give you an example. You can see that you are using Python for data analysis, and then you package the analysis process and send it to another colleague, but the colleague uses MacOS system, so he can’t open it. But at this time, if you both install anaconda, the problem will not exist.

For many people who don’t understand the program, installing one software is always easier than installing several software. Because you only need to install anaconda, it comes with:

An open source software package and environment management system named CONDA can easily load the system environment.

A set of machine learning libraries, such as tensorflow, scikit learn, and theano.

A set of data analysis libraries, such as pandas, numpy and dask.

A set of visualization libraries, such as bokeh, datashader, Matplotlib, and holoviews.

A set of Python IDE, such as a shared ide of jupyter notebook, combines real-time code, visualization and text. An advanced ide named jupyterlab and a data analysis ide named Spyder.

The steps for installing windows are as follows:

1. Visit anaconda com/downloads

Installation and use of Python

Note: don’t make a mistake. You should make a personal version. This is free. If you make a commercial version, this will be charged. Many friends make a mistake.

2. Select Windows Installer Download

3. Open and run setup

Don’t tick or move any of the options in the later installation, and select the default.

4. Open Anaconda prompt and run some Python code

At the anaconda prompt, type Python and enter to start the Python interpreter,

Enter import this again, and the maxim of Python kernel developer Tim Peters will pop up:

Beauty is better than ugliness,

Clarity is better than obscurity;

Simplicity is better than complexity,

Complexity is better than chaos,

Flat is better than nested,

Sparse is better than dense,

Readability is important!

Even if practical is better than pure,

Special cases can not violate the principle.

Mistakes must not be ignored quietly,

Unless it clearly needs to

This is also the design principle of Python language.

Installing Anaconda on Mac OS is basically the same as windows. Click “download” on the official website, and then download the Mac OS PKG setup files. But one difference is that after installation, you need to load Anaconda into the environment variable in path.

Open the MacOS terminal and enter:

$ cd ~

$ source .bashrc

Complete the installation.

For auditors, since they are not professional programmers, it is difficult to manage the installed libraries, and other personnel are often required to follow up after analyzing a set of data. At this time, the importance of anaconda is self-evident.

In fact, I hope that Chinese software enterprises can develop a resource management system suitable for Chinese people. Of course, it’s best not to use money. If you want money, I also hope it can be cheaper. Because a software management system is really useful to outsiders.

This work adoptsCC agreement, reprint must indicate the author and the link to this article