アプリケーション開発ポータルサイト
ServerNote.NET
ServerNote.NET厳選キャンペーン・クーポンはこちら!
カテゴリー【Python
【TensorFlow2.6】AttributeError: module tensorflow.tools.docs.doc_controls has no attribute inheritable_headerに対処
POSTED BY
2022-03-22

表題のエラーが出た場合、当方の環境ではtensorflowとtensorflow-estimatorのバージョンが相違していた。

pip3 show tensorflow
Name: tensorflow
Version: 2.6.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: /usr/local/lib/python3.9/dist-packages
Requires: google-pasta, grpcio, wrapt, termcolor, opt-einsum, flatbuffers, protobuf, tensorboard, wheel, numpy, absl-py, astunparse, gast, keras, keras-preprocessing, typing-extensions, tensorflow-estimator, six, h5py, clang
Required-by: tf-models-official, tensorflow-text

pip3 show tensorflow-estimator
Name: tensorflow-estimator
Version: 2.7.0
Summary: TensorFlow Estimator.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: None
License: Apache 2.0
Location: /usr/local/lib/python3.9/dist-packages
Requires:
Required-by: tensorflow

tensorflow-estimatorをダウングレード

pip3 install --upgrade tensorflow-estimator==2.6.0
Collecting tensorflow-estimator==2.6.0
  Downloading tensorflow_estimator-2.6.0-py2.py3-none-any.whl (462 kB)
     |????????????????????????????????| 462 kB 9.1 MB/s
Installing collected packages: tensorflow-estimator
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.6.0 requires keras~=2.6, which is not installed.
Successfully installed tensorflow-estimator-2.6.0

pip3 show tensorflow-estimator
Name: tensorflow-estimator
Version: 2.6.0
Summary: TensorFlow Estimator.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: None
License: Apache 2.0
Location: /home/hogeuser/.local/lib/python3.9/site-packages
Requires:
Required-by: tensorflow

これで当該エラーは無くなるが、kerasの問題が残るので以下に続く。

【TensorFlow2.6】AlreadyExistsError: Another metric with the same name already existsとModuleNotFoundError: No module named kerasに同時対処

無農薬野菜作りを楽しむことが出来る「畑のレンタルサービス」です【シェア畑】
■ 案件概要 シェア畑は、畑を借りて無農薬野菜作りを楽しむことが出来る 「畑のレンタルサービス」です。 ...READ MORE
TAクリニック|安心の最長5年保証【全国展開中の美容外科 TAクリニック】
■全施術対応(デフォルト)のLPご確認:<a href="https://taclinic.jp/ad/clinic/">こちらをクリック</a> ...READ MORE
商品数8000点以上 日本最大級の家具専門通販サイト【カヴァース】
家具通販専門店 カヴァース は、創業から10年以上、日本最大級の家具専門通販サイトです。  1 商品数80...READ MORE
※本記事は当サイト管理人の個人的な備忘録です。本記事の参照又は付随ソースコード利用後にいかなる損害が発生しても当サイト及び管理人は一切責任を負いません。
※本記事内容の無断転載を禁じます。
【webmaster/管理人】
自営業プログラマー
ご連絡は以下アドレスまで★

☆ServerNote.NETショッピング↓
ShoppingNote
☆お仲間ブログ↓
一人社長の不動産業務日誌
【キーワード検索】