ubuntu18.04 wrong operation! python -m pip uninstall pip

When operating the ros system on ubuntu18.04, an error occurs during the installation of some installation packages:

Command "python setup.py egg_info" failed with error code 1 in......

Some misleading articles say that the pip version is low! Said to use the following wrong way! ! ! !

python -m pip install --upgrade pip

After that, the problem was not solved, and I would report an error during other pip installations:

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.

Since ros-melodic in ubuntu18.04 works under python2, the python version cannot be changed. I can't solve this problem by upgrading the python version, I just think about how to delete this wrong pip tool! ! !

I have tried before:

sudo apt-get remove python-pip

Not at all! ! !

This command removes the pip tool with good system functions! ! ! And after removal, the pip of this basic environment can still be used and the error still exists! ! !

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.

Finally, I modified it according to his installation command and successfully uninstalled:

python -m pip uninstall pip

 What's interesting is that when I uninstalled him, I was still reporting an error. . . Finally, it was successfully uninstalled.

zn@zn:~/catkin_ws$ python -m pip uninstall pip
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Found existing installation: pip 20.3.4
Uninstalling pip-20.3.4:
  Would remove:
    /home/zn/.local/bin/pip
    /home/zn/.local/bin/pip2
    /home/zn/.local/bin/pip2.7
    /home/zn/.local/lib/python2.7/site-packages/pip-20.3.4.dist-info/*
    /home/zn/.local/lib/python2.7/site-packages/pip/*
Proceed (y/n)? y
  Successfully uninstalled pip-20.3.4

Now I am using pip and no longer report errors

zn@zn:~/catkin_ws$ pip install numpy
Collecting numpy
  Using cached https://files.pythonhosted.org/packages/3a/5f/47e578b3ae79e2624e205445ab77a1848acdaa2929a00eeef6b16eaaeb20/numpy-1.16.6-cp27-cp27mu-manylinux1_x86_64.whl
Installing collected packages: numpy
Successfully installed numpy-1.16.6

After this lesson, you must be cautious when it comes to adjusting the operation of the pip tool.

Guess you like

Origin blog.csdn.net/wzfafabga/article/details/129464439
pip