Error while trying to import pysyft in lesson 1 Duet Basics (Foundations course)
I followed all the steps mentioned in the discussions and i still have this problem:
Discussed in https://github.com/OpenMined/courses/discussions/273
Originally posted by cbs-rschreijen March 17, 2021 Hi,
I setup a virtual environment (tried both conda and venv), activated it and installed pip requirements per course instruction. When running the notebooks for the Duet Basics demo I get an error at the first statement in both notebooks while loading the pysyft library (same error). I am running on macOS 11.1 Big Sur.
AttributeError Traceback (most recent call last)
~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/init.py in
~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/core/node/device/init.py in
~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/core/node/device/client.py in
~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/core/node/common/client.py in
~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/lib/init.py in
~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/lib/init.py in create_lib_ast() 10 11 python_ast = create_python_ast() ---> 12 torch_ast = create_torch_ast() 13 torchvision_ast = create_torchvision_ast() 14 # numpy_ast = create_numpy_ast()
~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/lib/torch/init.py in create_torch_ast() 51 # this allows us to import them for testing 52 continue ---> 53 ast.add_path( 54 path=method, framework_reference=torch, return_type_name=return_type 55 )
~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/ast/globals.py in add_path(self, path, index, return_type_name, framework_reference) 63 attr = self.attrs[framework_name] 64 if hasattr(attr, "add_path"): ---> 65 attr.add_path( # type: ignore 66 path=path, index=1, return_type_name=return_type_name 67 )
~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/ast/module.py in add_path(self, path, index, return_type_name, framework_reference) 118 self.lookup_cache[attr_ref] = path 119 if hasattr(attr, "add_path"): --> 120 attr.add_path( # type: ignore 121 path=path, index=index + 1, return_type_name=return_type_name 122 )
~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/ast/callable.py in add_path(self, path, index, return_type_name) 80 if path[index] not in self.attrs: 81 ---> 82 attr_ref = getattr(self.ref, path[index]) 83 84 if isinstance(attr_ref, module_type):
AttributeError: type object 'Tensor' has no attribute 'fft'
@Merna-Atef this answer might help