【问题标题】:Python 3.5.2 Windows x86-64 web-based, but installer not installing pipPython 3.5.2 Windows x86-64 基于网络,但安装程序未安装 pip
【发布时间】:2017-05-03 19:15:26
【问题描述】:

我正在尝试安装 TensorFlow。 Windows 的安装说明 (https://www.tensorflow.org/install/install_windows) 作为安装 Python 3.5.2 的第一步。我正在做“仅支持 CPU 的 TensorFlow”。

Python 已成功安装在我的计算机中,因为我可以通过“开始”菜单运行它。

但是,当我尝试执行安装说明的第二步以安装 TensorFlow 时,此步骤表示:

  To install TensorFlow, start a terminal. Then issue the appropriate pip3 install command in that terminal. To install the CPU-only version of TensorFlow, enter the following command:

   C:\> pip3 install --upgrade tensorflow

但是当我执行上述语句时出现错误,错误是

  'pip' is not recognized as an internal or external command, oprable program or batch file.

我查看了 StackOverflow 中的几篇帖子,并尝试了其中一篇帖子中提供的命令,但我会得到相同类型的错误。

那么,“pip3”是如何安装的?根据我的阅读,它应该与安装一起安装,但显然没有发生。

如何安装它?我需要安装TensorFlow,看来需要通过pip3安装工具来完成。

提前感谢您的帮助!

【问题讨论】:

标签: python-3.x tensorflow pip


【解决方案1】:

要么设置系统环境路径变量以在其中包含 python 3.5.x 路径,要么直接 cd 进入正确的 python 文件夹以从那里运行 pip3。

windows 10 中的文件夹应该是这样的:

C:\Users\YOUR_USERNAME\AppData\Local\Programs\Python\Python35\Scripts

打开终端,cd 到该路径(将 YOUR_USERNAME 更改为正确的用户),然后运行以下命令:

pip3 install --upgrade tensorflow

如果你想要 gpu 版本:

pip3 install --upgrade tensorflow-gpu

安装 Python 时已经安装了 Pip3,因此无需执行任何其他操作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-05-24
    • 2015-01-05
    • 1970-01-01
    • 2020-12-02
    • 1970-01-01
    • 2017-05-26
    • 1970-01-01
    相关资源
    最近更新 更多