ubuntu pip安装报错 which is not on PATH

首先看一下warnning信息

  WARNING: The script normalizer is installed in '/home/llxy/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

配置环境变量

gedit ~/.bashrc
# 在文件最后添加路径,该路径来源于第一步中安装 pip 时发出的警告
export PATH=/home/llxy/.local/bin:$PATH
source ~/.bashrc