Search code examples
pythoninstallationpip

"Warning: pip, pip3, and pip3.10 scripts are at '/usr/local/python/3.10.8/bin' not on PATH. Add to PATH or use --no-warn-script-location?"


On VS Code, I tried to use pip to install the newest version of Python using the command $ pip install python 3.12.1 (I didn't know if VS code repos do this automatically or manually, and trying it with pip seemed to be a good option (if there's a way to do it, please tell me)).

When I did, it said:

[notice] A new release of pip is available: 23.3.1 -> 23.3.2

Of course, I updated it, and then it showed me this:

WARNING: The scripts pip, pip3 and pip3.10 are installed in '/usr/local/python/3.10.8/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.

My questions:

  1. What exactly is it telling me?
  2. What will happen if I don't do anything?
  3. Is it worth fixing, and is it an actual problem (similar to #2)?
  4. What is the difference between adding it to PATH or using a --no-warn-script-location?
  5. What should I do?

Solution

  • What exactly is it telling me?

    That any script under /usr/local/python/3.10.8/bin is not accessible like regular commands like ls or cd. which <script> command will not find them. Typing a few characters of script name and hitting tab twice will give no good results.

    What will happen if I don't do anything?

    Full path to the script will be needed to run them

    Is it worth fixing, and is it an actual problem (similar to #2)?

    I believe it is since it a simple fix but it depends on specific needs. Not an actual problem if you know what to do if an script is not found. It's a convenience problem probably.

    What is the difference between adding it to PATH or using a --no-warn-script-location?

    Using --no-warn-script-location means script location path is not important to you (because you know what you are doing?). Fixing PATH explained above.

    What should I do?

    Fix the PATH (recommended) or not. Depends on one's needs.