0

Every time I install something using pip I get this warning message and the package I installed doesn't work. I don't understand what path is or how to fix it. I keep seeing solutions saying to simply change the files to the absolute path but fail to elaborate on how to do so. Other solutions I see seemingly only apply to windows and I'm a Mac user.

WARNING: The scripts pip, pip3 and pip3.8 are installed in '/Users/landonbragg/Library/Python/3.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

For example of my problem, I've installed pytest but whenever I try to run it I get the error message...

zsh: command not found: pytest
Landon
  • 15
  • 8

3 Answers3

0

For the installation, try using this command python3 -m pip install <Module> instead of pip install <Module>

0

Did you try to add this directory to your path?:

/Users/landonbragg/Library/Python/3.8/bin

If not, maybe you want to check this post out How to set PATH environment variable?

Gulnihal
  • 76
  • 6
  • Thank you so much, do you know if its possible to have newly created directories automatically be set to my path, and if so how can I do that? – Landon Aug 10 '22 at 04:23
  • You can find a way to set the path to your environmental variables with the command line but tbh, I have no idea if you can set the path automatically without any action. – Gulnihal Aug 11 '22 at 06:43
0

WARNING: The scripts pip, pip3 and pip3.8 are installed in '/Users/landonbragg/Library/Python/3.8/bin' which is not on PATH. Consider adding this directory to PATH

The warning tells you what to do. Add '/Users/landonbragg/Library/Python/3.8/bin' to the environment variable

MingJie-MSFT
  • 5,569
  • 1
  • 2
  • 13