0

I run this simple code on google colab.

###cell 1 : `!pip install syft` 
###cell 2 : `import syft as sy` 

and i got this error :

ModuleNotFoundError: No module named 'syft_proto.messaging.v1.protocol_pb2'

There is the full error message

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-3-9aeadc8ee442> in <module>()
----> 1 import syft as sy

7 frames
/usr/local/lib/python3.6/dist-packages/syft/__init__.py in <module>()
     41 
     42 # Import grids
---> 43 from syft.grid.private_grid import PrivateGridNetwork
     44 from syft.grid.public_grid import PublicGridNetwork
     45 

/usr/local/lib/python3.6/dist-packages/syft/grid/private_grid.py in <module>()
      9 # Syft imports
     10 from syft.grid.abstract_grid import AbstractGrid
---> 11 from syft.workers.node_client import NodeClient
     12 from syft.messaging.plan.plan import Plan
     13 from syft.frameworks.torch.tensors.interpreters.additive_shared import AdditiveSharingTensor

/usr/local/lib/python3.6/dist-packages/syft/workers/node_client.py in <module>()
      5 
      6 # Syft imports
----> 7 from syft.serde import serialize
      8 from syft.messaging.plan import Plan
      9 from syft.codes import REQUEST_MSG, RESPONSE_MSG

/usr/local/lib/python3.6/dist-packages/syft/serde/__init__.py in <module>()
----> 1 from syft.serde.serde import *

/usr/local/lib/python3.6/dist-packages/syft/serde/serde.py in <module>()
     10 from syft.workers.abstract import AbstractWorker
     11 
---> 12 from syft.serde import msgpack
     13 
     14 ## SECTION:  High Level Public Functions (these are the ones you use)

/usr/local/lib/python3.6/dist-packages/syft/serde/msgpack/__init__.py in <module>()
----> 1 from syft.serde.msgpack import serde
      2 from syft.serde.msgpack import native_serde
      3 from syft.serde.msgpack import torch_serde
      4 from syft.serde.msgpack import proto
      5 

/usr/local/lib/python3.6/dist-packages/syft/serde/msgpack/serde.py in <module>()
     57 from syft.messaging.plan import Plan
     58 from syft.messaging.plan.state import State
---> 59 from syft.messaging.protocol import Protocol
     60 from syft.messaging.message import Message
     61 from syft.messaging.message import Operation

/usr/local/lib/python3.6/dist-packages/syft/messaging/protocol.py in <module>()
     11 from syft.workers.abstract import AbstractWorker
     12 from syft.workers.base import BaseWorker
---> 13 from syft_proto.messaging.v1.protocol_pb2 import Protocol as ProtocolPB
     14 
     15 

ModuleNotFoundError: No module named 'syft_proto.messaging.v1.protocol_pb2'

Hope that you can help me. Thank you

Eduardo Yáñez Parareda
  • 9,126
  • 4
  • 37
  • 50

3 Answers3

3

Thank you for answers. It works when i downgrade these two packages, it is a temporary problem due to pysyft developers.

!pip install syft=="0.2.2a1"
!pip install syft_proto=="0.1.1a1.post17"
0

It looks the module you are trying to use is either deprecated or has a new version. See here the file is not active.

Try searching if a newer version of this protocol exists or any similar protocol that can cater to your needs.

Edit:

It may also be that you are using an older version Syft and so I recommend you to upgrade your pip and Syft. Follow the instructions here

AzyCrw4282
  • 7,222
  • 5
  • 19
  • 35
0

you can upgrade both to their latest version which are kept compatible!

!pip install --upgrade syft
!pip install --upgrade syft_proto
LaRiffle
  • 11
  • 3