jupyter notebook ImportError 질문
조회수 3870회
jupyter notebook로 import 가 안됩니다. 어떻게 해야할까요 ?
C:\Users\insor\Desktop\py35\object_detection\utils 폴더에 있는 label_map_util.py 모듈을
C:\Users\insor\Desktop\py35\object_detection 폴더 에있는 object_detection_tutorial.ipynb 에서 import 하려고 합니다.
object_detection_tutoria 에서 아래 코드를 실행하면
from utils import label_map_util
ImportError Traceback (most recent call last) in () ----> 1 from utils import label_map_util
C:\Users\insor\Desktop\py35\object_detection\utils\label_map_util.py in () 20 import tensorflow as tf 21 from google.protobuf import text_format ---> 22 from object_detection.protos import string_int_label_map_pb2 23 24
ImportError: cannot import name 'string_int_label_map_pb2'
라고 뜨네요
추가로.. 이걸 컴파일 하라고 하고 export 하라는데 어떻게 해야하나요? cmd창에 그대로 입력하거나 폴더 경로 변경해서 입력하니 에러가 납니다.
From tensorflow/models/
protoc object_detection/protos/*.proto --python_out=.
From tensorflow/models/
export PYTHONPATH=$PYTHONPATH:pwd
:pwd
/slim
원본 https://github.com/tensorflow/models/blob/master/object_detection/g3doc/installation.md
-
(•́ ✖ •̀)
알 수 없는 사용자
1 답변
-
ImportError Traceback (most recent call last) in () ----> 1 from utils import label_map_util
로 구글링 해보니 https://github.com/tensorflow/models/issues/1591 에서 astrung라는 분의 답변이 효과가 있나보네요.-
(•́ ✖ •̀)
알 수 없는 사용자
-
댓글 입력