Python and third-party libraries installation tutorial

A, Python installation tutorial

Step One: Download Python Package

Python enter the official website to https://www.python.org/downloads, choose their own versions of the Python computer to download the installation package. (This article download version is the latest version of python-3.7.3-amd64.exe).
Here Insert Picture Description

Step 2: Install

1. enter the installation path where the packages, and double-click the installation package performs the following operations.
Here Insert Picture Description
It should be noted the above steps, windows need to be added to the Python environment variable, if forget to check after the installation is complete Python will need to be manually added to the Windows environment variables, adding method: Right-click My Computer - Properties - Advanced System Settings - environment variables - system variables - select the "the path" - edit - python full path before installing the rearmost added (NOTE: the need to add a full path before ";") - OK - save.

2. Click the above custom installation, enter the following interface, we recommend checking all components, and then click "Next" here.
Here Insert Picture Description
3. Proceed as follows Note: Custom installation path is recommended. Then select "Install".
Here Insert Picture Description
4. The installation interface is as follows:
Here Insert Picture Description
The complete installation
Here Insert Picture Description

The third step: test

After the above steps have been performed, the need to test Python is installed successfully, open a command-line tool system administrator cmd, enter "python -V" (Python version information is displayed), and then return, if there are interface, the installation was successful.
Here Insert Picture Description

Step Four: Run

After the test installation, it can be started, and perform the following simple statements, or other complex statements.
Here Insert Picture Description
So far, Python has been successfully installed.

Second, third-party libraries installation tutorial

Python commonly used in scientific computing Numpy library, library Matplotlib visualization, machine learning library Scikit-Learn all belong to a third party library that the user need only download and install the import of usage, download and installation method described below (text only describes Numpy installation, download and install the rest of the library method empathy).

Step One: Download the installation package

Https://pypi.org/ to enter the following interface, and input the installation package numpy to be downloaded, then enter search:
Here Insert Picture Description
Select "numpy1.16.3" after -Download files into the following interface, select the appropriate version for download, download path to "C: \ Python37 \ Scripts" .
Here Insert Picture Description

Step 2: Install

Open a command-line tool with the system administrator cmd, cd to switch to the download path where the package, the implementation of "pip install numpy-1.16.3-cp37 -cp37m-win_amd64.whl" Enter.
Here Insert Picture Description
If the above statements appear, Numpy library installation is complete.

The third step: test

At the command prompt and enter "import numpy (as np)", the next line appears if the primary prompt, ">>>" said the installation was successful.

Step Four: Run

After the test installation, you may be used to create a one-dimensional array numpy detection results as FIG.

At this point, Python third party libraries numpy has been installed, the reader late ease of use; other libraries such as visualization library matplotlib, data analysis library pandas, game library pygame, machine learning library Scikit-Learn, deep learning tensorflow, keras such as download and installation methods are the same token, if the problems encountered during the download and installation questions can leave a message at the bottom of the article, Xiao Bian answer promptly as possible.

Published 21 original articles · won praise 6 · views 8020

Guess you like

Origin blog.csdn.net/weixin_42128329/article/details/90046108