猿问

使用 tensorflow 将 protobuf leeds 升级为警告

这是我到目前为止所发现的。升级 protobuf 导致:


$ pip3 install --upgrade protobuf

Collecting protobuf

  Using cached https://files.pythonhosted.org/packages/18/e7/785830a65d1f1faba7dccfa8314f7afded1db8cc2860218226ba4b3f6150/protobuf-3.6.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl

Requirement already satisfied, skipping upgrade: setuptools in /usr/local/lib/python3.7/site-packages (from protobuf) (40.5.0)

Requirement already satisfied, skipping upgrade: six>=1.9 in /usr/local/lib/python3.7/site-packages (from protobuf) (1.11.0)

tensorflow 0.12.0 has requirement protobuf==3.1.0, but you'll have protobuf 3.6.1 which is incompatible.

Installing collected packages: protobuf

  Found existing installation: protobuf 3.1.0

    Uninstalling protobuf-3.1.0:

      Successfully uninstalled protobuf-3.1.0

Successfully installed protobuf-3.6.1

简而言之:tensorflow 0.12.0 has requirement protobuf==3.1.0。为什么需要最新的 tensorflow 版本和旧的 protobuf 版本?


但这更奇怪:


$ pip3 install --upgrade tensorflow

...

tensorboard 1.12.0 has requirement protobuf>=3.4.0

我的结论正确吗?tensorflow 和 tensorboard 需要不同版本的 protobuf?怎么样?我错过了什么?


我发现了一个类似的错误,但我没有完全理解它。Mac 操作系统和 cpython 的东西。问题链接:https : //github.com/google/or-tools/issues/681


我使用 macOS 并且我已经用 Homebrew 安装了 python。


它会帮助我安装较旧的 python 版本吗?


我正在寻找解释和解决方案。谢谢


忽然笑
浏览 568回答 1
1回答

Cats萌萌

原来 Tensorflow 不支持最新版本的 python。Pip 找不到适用于 python 3.7 的最新版本的 Tensorflow。
随时随地看视频慕课网APP

相关分类

Python
我要回答