Mac OS에 설치후 파이썬에서 Import tensorflow as tf했더니 아래와 같은 에러가 난다..


Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/Library/Python/2.7/site-packages/tensorflow/__init__.py", line 4, in <module>

    from tensorflow.python import *

  File "/Library/Python/2.7/site-packages/tensorflow/python/__init__.py", line 13, in <module>

    from tensorflow.core.framework.graph_pb2 import *

  File "/Library/Python/2.7/site-packages/tensorflow/core/framework/graph_pb2.py", line 8, in <module>

    from google.protobuf import reflection as _reflection

  File "/Library/Python/2.7/site-packages/google/protobuf/reflection.py", line 58, in <module>

    from google.protobuf.internal import python_message as message_impl

  File "/Library/Python/2.7/site-packages/google/protobuf/internal/python_message.py", line 59, in <module>

    import six.moves.copyreg as copyreg

ImportError: No module named copyreg



맥os에서 흔히 있는 문제들에 정리되어 있었네요... 

TensorFlow는 six-1.10.0가 필요한데 애플의 기본 python 환경은 six-1.4.1 이므로 업그레이드가 필요하다...


아래 커맨드로 해결


sudo easy_install -U six


여기 참고...

http://www.tensorflow.org/get_started/os_setup.html#on-macosx


+ Recent posts