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
pip install --upgrade pip pip install --root-user-action=ignore requests
pip3 install --upgrade pip pip3 install --root-user-action=ignore requests
在 Linux、MacOS 和 Windows 上设置环境变量。
Linux and MacOS
export PIP_ROOT_USER_ACTION=ignore
Windows Command Prompt
setx PIP_ROOT_USER_ACTION ignore
PowerShell
$Env:PIP_ROOT_USER_ACTION=“ignore”
推荐阅读
发表评论