安装Bazel报错Bazel & Tensorflow: Inception v3 retraining: AttributeError: 'int' object attribute '__doc_

问题1:
Traceback (most recent call last):
File "/home/tensorflow/tensorflow/bazel-bin/tensorflow/examples
/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/
examples/image_retraining/retrain.py", line 108, in <module>
import tensorflow as tf
File "/home/tensorflow/tensorflow/bazel-bin/tensorflow/
examples/image_retraining/retrain.runfiles/org_tensorflow/
tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/tensorflow/tensorflow/bazel-bin/tensorflow/
examples/image_retraining/retrain.runfiles/org_tensorflow/
tensorflow/python/__init__.py", line 63, in <module>
from tensorflow.python.framework.framework_lib import *
File "/home/tensorflow/tensorflow/bazel-bin/tensorflow/
examples/image_retraining/retrain.runfiles/org_tensorflow/
tensorflow/python/framework/framework_lib.py", line 102, 
in <module>
from tensorflow.python.framework.importer import 
import_graph_def
File "/home/tensorflow/tensorflow/bazel-bin/tensorflow/
examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/
python/framework/importer.py", line 30, in <module>
from tensorflow.python.framework import function
File "/home/tensorflow/tensorflow/bazel-bin/tensorflow/
examples/image_retraining/retrain.runfiles/org_tensorflow/
tensorflow/python/framework/function.py", line 34, in <module>
from tensorflow.python.ops import variable_scope as vs
File "/home/tensorflow/tensorflow/bazel-bin/tensorflow/
examples/image_retraining/retrain.runfiles/org_tensorflow/
tensorflow/python/ops/variable_scope.py", line 191, 
in <module>
"""
AttributeError: 'int' object attribute '__doc__' 
    is read-only
解决方法:
I've just come across this too, and I noticed that there was an issue 
about this in tensorflow recently. The solution is the 
following workaround:
    Uninstall enum, if you've already installed it: 
    sudo pip remove enum
    sudo apt-get install python-enum34
Try again.
问题2:
Executing genrule @bazel_tools//tools
/android:no_android_sdk_repository_erro
解决:
在tensorflow下的WORKSPACE文件夹下添加如下信息:
android_sdk_repository(
    name="androidsdk",
    // 设置为你安装的SDK的最高版本,对应修改mainfest.xml以及target
    api_level = 28,
    build_tools_version = "28.0.1",
    // Android sdk Path
    path = "/home/tclxa/Android/Sdk",
)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值