'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 do I go about solving this problem on centos 7?



Solution 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ImBIOS