OpenMined / PySyft

Perform data science on data that remains in someone else's server
https://www.openmined.org/
Apache License 2.0
9.53k stars 1.99k forks source link

error when 'import syft' (syft==0.2.9) #4621

Closed Doodlera closed 4 years ago

Doodlera commented 4 years ago

Description

After I update my syft to 0.2.9,I'm not allowed to import syft

Here is the traceback:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-4-7df2e9ff92ca> in <module>
----> 1 import syft as sy  # import the Pysyft library
      2 hook = sy.TorchHook(torch)  # hook PyTorch to add extra functionalities like Federated and Encrypted Learning
      3 
      4 # simulation functions
      5 def connect_to_workers(n_workers):

~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\syft\__init__.py in <module>
     12 # This import statement is strictly here to trigger registration of syft
     13 # tensor types inside hook_args.py.
---> 14 import syft.frameworks.torch.hook.hook_args
     15 
     16 import logging

~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\syft\frameworks\torch\hook\hook_args.py in <module>
      2 
      3 from syft import dependency_check
----> 4 from syft.frameworks.torch.tensors.interpreters.native import TorchTensor
      5 from syft.generic.frameworks.hook.hook_args import (
      6     register_ambiguous_method,

~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\syft\frameworks\torch\tensors\interpreters\native.py in <module>
     14 from syft.generic.abstract.hookable import hookable
     15 from syft.generic.pointers.pointer_tensor import PointerTensor
---> 16 from syft.generic.utils import memorize
     17 from syft.workers.base import BaseWorker
     18 

~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\syft\generic\utils.py in <module>
----> 1 from syft.generic.frameworks.attributes import allowed_commands
      2 import syft as sy
      3 
      4 
      5 class memorize(dict):

~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\syft\generic\frameworks\attributes.py in <module>
      6 from typing import Any
      7 
----> 8 from syft.generic.frameworks.hook.hook import FrameworkHook
      9 
     10 allowed_commands = set()

~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\syft\generic\frameworks\hook\hook.py in <module>
      9 from syft.generic.frameworks.hook import hook_args
     10 from syft.generic.pointers.pointer_tensor import PointerTensor
---> 11 from syft.generic.frameworks.hook.pointers import PointerHook
     12 from syft.generic.frameworks.hook.string import StringHook
     13 from syft.generic.frameworks.hook.tensors import TensorHook

~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\syft\generic\frameworks\hook\pointers.py in <module>
      6 from syft.exceptions import TensorsNotCollocatedException
      7 from syft.generic.frameworks.hook import hook_args
----> 8 from syft.generic.pointers.multi_pointer import MultiPointerTensor
      9 from syft.generic.pointers.object_pointer import ObjectPointer
     10 from syft.generic.pointers.pointer_tensor import PointerTensor

~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\syft\generic\pointers\multi_pointer.py in <module>
      9 from syft.generic.abstract.tensor import AbstractTensor
     10 from syft.workers.abstract import AbstractWorker
---> 11 from syft.workers.base import BaseWorker
     12 
     13 

~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\syft\workers\base.py in <module>
     10 import syft as sy
     11 from syft import codes
---> 12 from syft.execution.plan import Plan
     13 from syft.frameworks.torch.mpc.primitives import PrimitiveStorage
     14 

~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\syft\execution\plan.py in <module>
     19 from syft.execution.translation.default import PlanTranslatorDefault
     20 from syft.execution.translation.torchscript import PlanTranslatorTorchscript
---> 21 from syft.execution.translation.threepio import PlanTranslatorTfjs
     22 from syft.execution.translation import TranslationTarget
     23 from syft.generic.frameworks import framework_packages

~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\syft\execution\translation\threepio.py in <module>
      1 from typing import List
      2 import pythreepio
----> 3 from pythreepio.threepio import Threepio
      4 from pythreepio.command import Command
      5 from syft.execution.computation import ComputationAction

ModuleNotFoundError: No module named 'pythreepio.threepio'
LaRiffle commented 4 years ago

Hi! Very strange that it didn't install pythreepio... You can install manually pip install openmined.threepio==0.2.0 Please let me know if this fixes the pb

LaRiffle commented 4 years ago

Any update @Doodlera?

Doodlera commented 4 years ago

Any update @Doodlera?

It didn't work. I install manually by pip install openmined.threepio==0.2.0.It have been installed as follow: image But I still have the problem: ModuleNotFoundError: No module named 'pythreepio.threepio'

Doodlera commented 4 years ago

Any update @Doodlera?

By the way,I used to find the same problem in 0.2.7. I change the release to 0.2.6 and avoid it.

github-actions[bot] commented 4 years ago

This issue has been marked stale because it has been open 30 days with no activity. Leave a comment or remove the stale label to unmark it. Otherwise, this will be closed in 7 days.

cereallarceny commented 4 years ago

Hello! Just letting you know that we are no longer planning on supporting anything on the 0.2.x product line and that all work should be ported over to 0.3.x, which is considered a complete rebuild of PySyft. Because of that, I’ll be closing this issue. If you feel this is a mistake, or if the issue actually applies to 0.3.x as well, please feel free to ping me on Slack and I’ll reopen the issue.