Installation of python3 library files

As a python beginner, I usually don't know how to install many python libraries. As a python enthusiast who has just started, I spent a whole night studying the installation of python libraries, and I will share my experience with you.

After downloading python3, the installation tools pip and easy_install are already available in the Scripts folder of the installation directory. The next thing to do is to add the python installation directory and the Scripts path to the computer environment variable (path).

After adding the environment variables, enter the command pip install (or easy_install) + the library to be installed in the cmd window. For example, if I want to install numpy, enter pip install numpy or easy_install numpy, and the computer will automatically download and install numpy for you. If this method fails to install, go to the python official website to download the corresponding version of the installation package (pay attention to the corresponding python version and the number of computer bits), and then enter the pip install (or easy_install) installation file path name + file name in the cmd window. For example, I installed python35, the computer is 64-bit, and matplotlib needs to be installed, so I downloaded matplotlib-2.1.0rc1-cp35-cp35m-win_amd64.whl, and the installation file is placed in the root directory of the D drive. Then open cmd, enter pip install D:\matplotlib-2.1.0rc1-cp35-cp35m-win_amd64.whl (or easy_install D:\matplotlib-2.1.0rc1-cp35-cp35m-win_amd64.whl), then the computer will do it for you Install. Once installed you can view the python libraries you have installed by typing pip list.

This is the first time to write a blog, and I hope you will make any mistakes~

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325649543&siteId=291194637