Home > Backend Development > Python Tutorial > How to solve the problem of failed installation of python installation library

How to solve the problem of failed installation of python installation library

(*-*)浩
Release: 2019-07-09 10:04:41
Original
17617 people have browsed it

I believe that many novices who are just getting started with Python will encounter some installation failure problems when installing python third-party libraries.

Below, I will share the solutions to such problems on the Windows operating system based on my own experience.

How to solve the problem of failed installation of python installation library

1. Know the python version you have installed (2.7 or 3.6, and more); (Recommended learning: Python video tutorial)

2. Check whether pip is installed and whether the pip version can be used;

3. Whether the network is normal;

If you confirm that there are no problems with the above, just Please read below:

1. Use Project Interpreter in Python IDE to install (a must for novices). It is very stupid and convenient, and you can manually select a third-party library that adapts to the python version. Installation, don’t be too considerate~

2. Use the pip or pip3 command in the cmd interface to manually install the third-party library. This should be the method that most people will choose. It is convenient and simple, ready to install and use, and does not require the assistance of an IDE. But many times the installation cannot be successful.

According to my experience, generally speaking, the reason for installation failure may be that the third-party library resources are Q (you know), or your python is installed on the C drive and there is not enough power when installing the third-party library. The file read and write permissions caused the installation to fail.

Solution: Run cmd as administrator, so that you can solve the problem of file read and write permissions. In the same way, you can run Pycharm as an administrator, which is also very convenient.

3. A more rational and efficient method is:

Python library collection

http://www.lfd.uci.edu/~gohlke/pythonlibs/

This is a magical website. On this website, you can download the wheel file as needed and install it using the pip install command (don’t forget to run it as an administrator). It’s perfect and works every time!

Similarly, when using the pip command, you need to pay attention to the python version corresponding to the .wheel file.

For more Python related technical articles, please visit the Python Tutorial column to learn!

The above is the detailed content of How to solve the problem of failed installation of python installation library. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template