(pip的使用): You are using pip version 21.2.4; however, version 23.0.1 is available.You should consider

When we installed ipython with pip, we reported the following bunch of red errors:

The prompt is to upgrade pip

 First of all, let's understand what is pip and what does it do?

        What does pip in python do? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail for you. Those who have needs in this area can come and learn. I hope you can gain something.

Python's pip is used to manage Python packages, and supports operations on Python packages such as installation, uninstallation, and updates.

pip is a tool for installing and managing Python packages. The tools for installing python packages include easy_install, setuptools, pip, distribute, etc. distribute is a substitute for setuptools and an enhancement to the disutils module of the standard library. We know that disutils is mainly used to package and distribute packages more easily, especially packages that depend on other packages. distribute was created because the Setuptools package is no longer maintained. And pip is an alternative to easy_install.

 solution:

Just follow his yellow prompt and enter the command  python -m pip install --upgrade pip

Then verify whether the installation is successful, and check the corresponding pip version number through the pip list 

pip management command added: 

  • pip install <package name> --- Install the specified package.
  • pip uninstall <package name> --- delete the specified package
  • pip list --- show installed packages
  • pip freeze --- Display the installed packages, and display them in the specified format

At this time, we will not report an error when we pass the command pip install ipython . successfully installed

 Query the packages installed by pip

Running the pip install command will download the specified python package from the website, by default it is downloaded from the https://files.pythonhosted.org/ website. This is a foreign website. When the network situation is not good, the download may fail. We can modify the source of pip's current software through commands.
Format: pip install package name -i domestic source address

For example: pip install ipython -i https://pypi.mirrors.ustc.edu.cn/simple/

The download speed of this command will be much faster than pip install ipython, faster in China

List of commonly used pip download sources in China (domestic source addresses):

  • Alibaba Cloud http://mirrors.aliyun.com/pypi/simple/
  • University of Science and Technology of China https://pypi.mirrors.ustc.edu.cn/simple/
  • Douban (douban) http://pypi.douban.com/simple/ (recommended)
  • Tsinghua University https://pypi.tuna.tsinghua.edu.cn/simple/
  • University of Science and Technology of China http://pvpi.mirrors.ustc.edu.cn/simple/

Guess you like

Origin blog.csdn.net/qq_41579104/article/details/130083962