25
votes
The script flake8.exe is installed in 'c:\users\me\appdata\local\programs\python\python36-32\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Did some research on this and it seems like some sort of recurring issue.

One fix recommends removing trailing slashes from the environment variable.

Any other ideas?

This occurs every time I install via PIP

I am running python 3.6

5
Note: the false warning is now fixed in pip. See github.com/pypa/pip/pull/5293 . Case sensitivity is also taken into account correctly. - florisla

5 Answers

15
votes

If removing trailing slashes from the environment variables don't work, please try the following. It works fine for me. I am using window 10 and python3.7.0

Advanced system settings -> Environment Variables -> Path

Select Edit

Select Move Up button for both python and Scripts directory.

enter image description here

Finally your path will be as the following.

enter image description here

If you are using other windows(In the case of not having move up button), put your python and Scripts directory at the beginning of the path.

0
votes

Removing trailing back slashes from those path elements is a good idea.

There may also be a problem that pip is written in python which uses case sensitive compares by default, (as is the default on every commonly used platform that I am aware of other than windows). You should also make sure that your path variable matches the case expected by pip, (the actual case of the path elements on windows does not have to match).

To do this go into the control panel, system settings, advanced poperties, advanced, Environmental Variables and edit the path elements that are giving the problem. (Windows has a nasty habit of capitalizing things even when you don't).

0
votes

Adding a new path solved my problem with this error:

'psycho_django' is not recognized as an internal or external command, operable program or batch file. 
0
votes

Yes, giving full permissions to the "C:\Program Files\Python38-32" all users location was the way to keep it from putting PIP into the Windows User folder AppData\Roaming where it decided to create a new Python\Python38-32 folder since it had no permissions to the main folder.

0
votes

I fixed this on Windows by adding full control permission to the folder where I installed python.

I installed it in "C:\Program Files\Python38-32".