Search code examples
pythonpippathcentoscentos7

WARNING: The script pip3.8 is installed in '/usr/local/bin' which is not on PATH


When running pip3.8 i get the following warning appearing in my terminal

WARNING: The script pip3.8 is installed in '/usr/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.
Successfully installed pip-21.1.1 setuptools-56.0.0
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv

How to solve this problem on centos 7?


Solution

  • This question has been answered on the serverfaults forum: Here is a link to the question.

    You need to add the following line to your ~/.bash_profile or ~/.bashrc file.

     export PATH="/usr/local/bin:$PATH"
    

    You will then need to profile, do this by either running the command:

    source ~/.bash_profile
    

    Or by simply closing your terminal and opening a new session. You should continue to check your PATH to make sure it includes the path.

    echo $PATH