ModuleNotFoundError:创建 TensorFlow 文档时没有名为“tensorflow_docs"的模块 [英] ModuleNotFoundError: No module named 'tensorflow_docs' when creating TensorFlow docs
问题描述
我正在尝试按照 贡献指南 获取文档.所需的步骤是:
I'm trying to follow the contribution guide for documentation. The required steps are:
git clone https://github.com/tensorflow/tensorflow tensorflow
cd tensorflow/tensorflow/tools/docs
pip install tensorflow==2.0.0-alpha0
python generate2.py --output_dir=/tmp/out
但最后一个命令给了我:
But the last command gives me:
回溯(最近一次调用最后一次):文件generate2.py",第 36 行,在from tensorflow_docs.api_generator import doc_controls ModuleNotFoundError: No module named 'tensorflow_docs'
Traceback (most recent call last): File "generate2.py", line 36, in from tensorflow_docs.api_generator import doc_controls ModuleNotFoundError: No module named 'tensorflow_docs'
这是在 generate2.py
的第 36 行:
This is in line 36 of generate2.py
:
from tensorflow_docs.api_generator import doc_controls
我没有找到包含 tensorflow_docs
的 pip 包.有什么想法吗?
I haven't found a pip package containing tensorflow_docs
. Any ideas?
推荐答案
首先使用这个命令安装 tensorflow_docs:
First install tensorflow_docs using this command:
pip install git+https://github.com/tensorflow/docs
这篇关于ModuleNotFoundError:创建 TensorFlow 文档时没有名为“tensorflow_docs"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!