我将 "python.exe" 更改为 "python3.exe" 但现在 pip returns 出现错误,我该如何解决?
I changed "python.exe" to "python3.exe" but now pip returns an error, how can i fix this?
所以为了让我的生活更轻松,我将 Python 2.7 更改为 "python2.exe and Python 3.6 to "python3.exe”。然后我将它们添加到我的路径中并能够在其中引用它们python2
打开 Python 2.7,python3
打开 Python 3.6.
这正是我想要的,但现在由于我更改了名称 pip
命令 returns this:
Fatal error in launcher: Unable to create process using '"'
我仍然希望能够参考 python3
和 运行 Python 3.6,但我需要 pip 才能工作。我是否更改 pip 文件以引用它?或者是别的什么?如果可以请帮忙。
我强烈建议您改回名称,因为许多脚本(可能包括 pip)需要原始文件名。
为了让您在 windows 上启动 python 文件时更轻松,python 提供了更灵活的解决方案。如果您在 windows 上安装了最新的 python3,则还应安装 Python Launcher for Windows。这意味着您可以使用 py <file>
命令 运行 python 2 和 3 脚本。启动器遵循指定 python 版本的 shebang 行,或者您可以传递一个标志以手动选择版本:py -2 <file>
所以为了让我的生活更轻松,我将 Python 2.7 更改为 "python2.exe and Python 3.6 to "python3.exe”。然后我将它们添加到我的路径中并能够在其中引用它们python2
打开 Python 2.7,python3
打开 Python 3.6.
这正是我想要的,但现在由于我更改了名称 pip
命令 returns this:
Fatal error in launcher: Unable to create process using '"'
我仍然希望能够参考 python3
和 运行 Python 3.6,但我需要 pip 才能工作。我是否更改 pip 文件以引用它?或者是别的什么?如果可以请帮忙。
我强烈建议您改回名称,因为许多脚本(可能包括 pip)需要原始文件名。
为了让您在 windows 上启动 python 文件时更轻松,python 提供了更灵活的解决方案。如果您在 windows 上安装了最新的 python3,则还应安装 Python Launcher for Windows。这意味着您可以使用 py <file>
命令 运行 python 2 和 3 脚本。启动器遵循指定 python 版本的 shebang 行,或者您可以传递一个标志以手动选择版本:py -2 <file>