python社區要放棄了pip?版本信息裏帶警告很不尋常哦

pip是python的一個包管理器。html

今天再查詢Pip3 -V 時,除了正常的版本信息外,多了幾行信息python

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.git


pip 20.0.2 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)

github

最後一行是Pip的版本,由於以前提示版本太舊,就安裝升級了一下app

pip3 install -upgreade pipthis

pip -V 是沒有警告信息,只有最後同樣的版本信息,因此,pip和pip3都是一個應用spa

 

閱讀一下警示信息,大概意思就是,pip是老舊的腳本包管理器,將來可能失效。debug

請到github的pip板塊去最新的建議。code

爲了不這個問題,你可使用python -m pip來替代直接使用Pip命令htm

看了一下https://github.com/pypa/pip/issues/559的內容

原來不少人升級了pip以後,出現各類問題,而後社區給了一些建議

估計是不少人抱怨Pip的問題,讓pip的開發人員很惱火,因此再開始,就說,這不是pip的問題,你麼須要本身解決本身的問題

this is not the "fault" of pip, and you will have to be prepared to do at least some of the debugging and fixes on your own

給了一個通用建議

一、Only ever use your system package manager to upgrade the system pip 。用你的系統包管理員升級系統pip

二、Never use sudo with pip 。不要sudo 來用pip

三、Prefer to use --user 。  指定用戶來用pip

還有一個社區建議:

就是全部的解決方案,你須要本身承擔風險,pip的開發人員沒法保證你的系統不會崩潰,你要謹慎使用。

 

看來這裏引起過大的爭吵,也致使了不少系統崩潰的風險,使用Pip要當心,聽從他們的3個建議吧。

原文出處:https://www.cnblogs.com/qumogu/p/12487115.html

相關文章
相關標籤/搜索