Skip to content

No module named copy_reg - Installation Issue #75

Description

@udaysinghcode

Currently this is my output after installing Tensorflow. I thought it installed six as well, but was wondering why copyreg doesn't exist in six. Anyone know what to do?

tensorflow % python

Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

Input:
import tensorflow as tf

Result:
Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/tensorflow/init.py", line 4, in
from tensorflow.python import *
File "/Library/Python/2.7/site-packages/tensorflow/python/init.py", line 13, in
from tensorflow.core.framework.graph_pb2 import *
File "/Library/Python/2.7/site-packages/tensorflow/core/framework/graph_pb2.py", line 8, in
from google.protobuf import reflection as _reflection
File "/Library/Python/2.7/site-packages/google/protobuf/reflection.py", line 58, in
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
import six.moves.copyreg as copyreg
ImportError: No module named copyreg

Activity

  1. vrv commented on Nov 10, 2015

    @vrv

    Please see if our detailed installation instructions page helps:
    https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#common_install_problems

    On Mon, Nov 9, 2015 at 9:09 PM, Uday Singh [email protected] wrote:

    Currently this is my output after installing Tensorflow. I thought it
    installed six as well, but was wondering why copyreg doesn't exist in six.
    Anyone know what to do?

    tensorflow % python

    Python 2.7.6 (default, Sep 9 2014, 15:04:36)
    [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.

    import tensorflow as tf
    Traceback (most recent call last):
    File "", line 1, in
    File "/Library/Python/2.7/site-packages/tensorflow/init.py", line 4, in
    from tensorflow.python import *
    File "/Library/Python/2.7/site-packages/tensorflow/python/init.py",
    line 13, in
    from tensorflow.core.framework.graph_pb2 import *
    File
    "/Library/Python/2.7/site-packages/tensorflow/core/framework/graph_pb2.py",
    line 8, in
    from google.protobuf import reflection as _reflection
    File "/Library/Python/2.7/site-packages/google/protobuf/reflection.py",
    line 58, in
    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
    import six.moves.copyreg as copyreg
    ImportError: No module named copyreg

    —
    Reply to this email directly or view it on GitHub
    #75.

  2. udaysinghcode commented on Nov 10, 2015

    @udaysinghcode
    Author

    @vrv Just saw this minutes after I posted. Thanks, but I got it all figured out, I forgot to use Python 2.7.10 and was using the 2.7.6 that comes with my computer.

  3. ShoujunChen commented on Nov 11, 2015

    @ShoujunChen

    Below solution in detailed installation page resolved my issue:

    Upgrade the system-wide copy of six:

    sudo easy_install -U six

  4. added a commit that references this issue on Sep 20, 2018
  5. added a commit that references this issue on Aug 13, 2019
    68ba90e
  6. added a commit that references this issue on Dec 6, 2019
  7. added a commit that references this issue on May 17, 2022
  8. added 2 commits that reference this issue on Mar 4, 2025
  9. added 4 commits that reference this issue on Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions