python - Pip 在 macOS 上找不到 python 3.6 的 tensorflow

标签 python tensorflow pip

我正在新的虚拟环境上安装tensorflow。当我尝试 pip install tensorflow 时,我收到以下消息

Collecting tensorflow-gpu
  Could not find a version that satisfies the requirement tensorflow-gpu (from 
versions: )
No matching distribution found for tensorflow-gpu

我使用的是 macOS yosemitie 和 python 3.6

我尝试过以下方法:

  • 使用 python 3.5 安装
  • 转到 pypi,下载轮子并在其上使用 pip
    • 此外,还尝试在 pip 中使用 --usewheel 选项
  • git 克隆tensorflow存储库并使用tensorflow/tools/pip_package/setup.py进行安装

到目前为止,还没有任何效果。关于为什么以及我能做什么有什么见解吗?

最佳答案

Note: As of version 1.2, TensorFlow no longer provides GPU support on macOS.

在没有-gpu的情况下运行以下命令:

pip  install --upgrade tensorflow     # for Python 2.7
pip3 install --upgrade tensorflow     # for Python 3.n

官方说明可以在这里找到:Installing TensorFlow on macOS

关于python - Pip 在 macOS 上找不到 python 3.6 的 tensorflow ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47118100/

相关文章:

python - 如何动态更新 tf.ones_like() 的形状?

Python 期望一个参数,发现三个,正确的语法是什么?

Python - 如何使用 python configParser 从配置文件(INI)读取列表值

tensorflow - 从源代码构建 Tensorflow 时,编译是从头开始还是在修复错误后继续?

python - tensorflow 中的线性模型

pip - 使用 pip 安装 Python OSC

python - 在python中加载动画

python - 从列中删除不在范围内的日期

python - 无法将库升级到 Google Colab 上的特定版本(scipy 版本 1.8.0)

python - 在 docker 中安装 pip