37
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

T D
  • 427
  • 1
  • 4
  • 11
  • Note: the false warning is now fixed in pip. See https://github.com/pypa/pip/pull/5293 . Case sensitivity is also taken into account correctly. – florisla Jul 12 '18 at 12:35

8 Answers8

24

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 window version(In the case of not having move up button), put your python and Scripts directory at the beginning of the path.

Necromancer
  • 869
  • 2
  • 9
  • 25
  • 1
    I was getting this issue using VS Code Insiders and Powershell 7RC2. Changing the PATH order as suggested fixed it. – Andrew Jan 21 '20 at 16:13
6

After defining the Path variable, make sure to restart your PC

I wasted a lot of time

Shahjahan
  • 171
  • 2
  • 3
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 17 '22 at 07:52
2

I had the same problem and I found out it was because of installing Python from Microsoft Store, so Uninstall it and download the latest version from python.org

Also, there is an (Add Python to PATH) check box on the installer!

mjavadtatari
  • 51
  • 2
  • 9
0

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).

Steve Barnes
  • 27,618
  • 6
  • 63
  • 73
0

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".

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Morpheus
  • 2,634
  • 1
  • 8
  • 5
0

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

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.

-1

as is correct on every platform other than windows" - not true. Many filesystems can be configured to be case insensitive - not just Windows.