PIP 10.0.1-警告“请考虑将此目录添加到路径或…”

2024-05-19 21:38:36 发布

您现在位置:Python中文网/ 问答频道 /正文

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.

做了一些研究,这看起来像是一个反复出现的问题。

一个修复建议从环境变量中删除尾部斜杠。

还有其他想法吗?

每次我通过PIP安装时都会发生这种情况

我正在运行Python3.6


Tags: installedthetopathinflake8islocal
2条回答

如果从环境变量中删除尾部斜杠不起作用,请尝试以下操作。 对我来说很好。 我在用windows10和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

最后你的路径如下。

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.

从这些路径元素中删除后面的斜杠是一个好主意。

可能还有一个问题,pip是用python编写的,它默认使用区分大小写的compare,(这是我所知道的除windows以外的所有常用平台的默认设置)。您还应该确保path变量与pip所期望的大小写匹配(windows上path元素的实际大小写必须匹配)。

要执行此操作,请进入“控制面板”、“系统设置”、“高级权限”、“高级”、“环境变量”并编辑导致问题的路径元素。(Windows有一个坏习惯,即使你不这么做,也会把东西资本化)。

相关问题 更多 >