Windows 10 中的 Python PIP 路径

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32510261/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 11:41:51  来源:igfitidea点击:

Python PIP Path in Windows 10

pythonpython-2.7pip

提问by Skrodde

I just installed Python 2.7.10, Release Date: 2015-05-23 in Windows. Then I tried to call PIP via the shell, which failed. So I assumed that the Scripts directory in of Python had not been added to the Path Variable. However, it had been added, but as

我刚刚在 Windows 中安装了 Python 2.7.10,发布日期:2015-05-23。然后我尝试通过 shell 调用 PIP,但失败了。所以我假设 Python 中的 Scripts 目录没有被添加到路径变量中。然而,它已被添加,但作为

 C:\Program Files\Python27\Scripts;

instead of

代替

 C:\Program Files\Python27\Scripts\;

I added the later and PIP immediately worked. Is it safe now to delete the former? And how can I notify the developers of this bug?

我添加了后者,PIP 立即生效。现在删除前者安全吗?以及如何通知开发人员此错误?

采纳答案by Tim

Is it safe now to delete the former?

现在删除前者安全吗?

Yes, as Zach mentioned you can edit your PATH to whatever you like, the worst that could happen is some program that uses $PATHwill no longer be able to find that executable, in which case you can just add it back to PATH.

是的,正如 Zach 提到的,您可以将 PATH 编辑为您喜欢的任何内容,可能发生的最坏情况是某些使用的程序$PATH将不再能够找到该可执行文件,在这种情况下,您只需将其添加回 PATH。

And how can I notify the developers of this bug?

以及如何通知开发人员此错误?

That's not necessary, because this is not a bug. I am on windows 10, same python version as you, and my PATH has C:\Python27\Scripts;and it works fine. It recognizes pipas a command.

这不是必需的,因为这不是错误。我在 Windows 10 上,和你一样的 python 版本,我的 PATH 有C:\Python27\Scripts;并且工作正常。它识别pip为命令。

It doesn't matter whether you add the trailing \or not. Same as you can cdinto a folder without appending a \to its name.

是否添加尾随\并不重要。与您可以cd进入文件夹而不\在其名称后附加 a 一样。

回答by Zach Gates

As far as modifying your PATH goes, you can add/remove whatever you like so long as you are sure you want to. In this case, you could easily change it back if something was amiss.

就修改您的 PATH 而言,您可以添加/删除您喜欢的任何内容,只要您确定需要。在这种情况下,如果出现问题,您可以轻松地将其改回。

You can go to the GitHub Issues Pagefor the PIP project and add an issue. Be sure to check and see if this issue already exists, first.

您可以转到PIP 项目的GitHub 问题页面并添加问题。请务必首先检查并查看此问题是否已存在。