WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
解决方法如下,依次运行下面的两个代码,第一个是先验条件,第二个代码块是自己要实现的目标。
# The --root-user-action option is available as of pip v22.1.pip install --upgrade pip
# 原始目标:pip install package# 用自己要pip的包替换【package】pip install --root-user-action=ignore 【package】