[Python] Why the import of google.protobuf works fine in ipython but not in python?

Discussão em 'Python' iniciado por Stack, Março 14, 2025.

  1. Stack

    Stack Membro Participativo

    In ipython

    Python 2.7.11 |Anaconda 2.4.1 (64-bit)
    IPython 3.1.0 -- An enhanced Interactive Python.

    In [1]: import google.protobuf

    In [2]:


    However in python:

    Python 2.7.11 |Anaconda 2.4.1 (64-bit)
    >>> import google.protobuf
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: No module named protobuf
    >>>


    Why this strange error happened? Please help me figure out.

    Continue reading...

Compartilhe esta Página