Pysyft: installation

Created on 13 Aug 2020  路  4Comments  路  Source: OpenMined/PySyft

Question

When I test the PySyft installation following the instructions, I obtain the next error:
ModuleNotFoundError: No module named 'syft.generic.tensor'

Instructions:
https://github.com/OpenMined/PySyft/blob/dev/INSTALLATION.md

I'm using linux:

  1. python setup.py install
  2. python setup.py test

error:

ImportError while loading conftest '..../PySyft/test/conftest.py'.
test/conftest.py:12: in
import syft
syft/__init__.py:8: in
from syft import frameworks # Triggers registration of any available frameworks # noqa:F401
syft/frameworks/__init__.py:9: in
from syft.frameworks import tensorflow
syft/frameworks/tensorflow/__init__.py:4: in
from syft_tensorflow.hook import TensorFlowHook
../../../.local/lib/python3.6/site-packages/syft_tensorflow/__init__.py:2: in
from syft_tensorflow.hook import TensorFlowHook
../../../.local/lib/python3.6/site-packages/syft_tensorflow/hook/__init__.py:1: in
import syft_tensorflow.hook.hook_args
../../../.local/lib/python3.6/site-packages/syft_tensorflow/hook/hook_args.py:20: in
from syft_tensorflow.syft_types import TensorFlowTensor
../../../.local/lib/python3.6/site-packages/syft_tensorflow/syft_types/__init__.py:1: in
from syft_tensorflow.syft_types.tensor import TensorFlowTensor
../../../.local/lib/python3.6/site-packages/syft_tensorflow/syft_types/tensor.py:6: in
from syft.generic.tensor import AbstractTensor
E ModuleNotFoundError: No module named 'syft.generic.tensor'

any ideas?

Thanks!

Type

Most helpful comment

yes, thank you!

All 4 comments

Hi @beatrizsmg, I see you're building from source, is there any reason for doing this rather than going the more conventional route of running

pip install 'syft[udacity]'

?


Other than that, from reading the install instructions you linked, I think you're missing the udacity argument from the install command, i.e., you should be running

python setup.py install udacity

instead of

python setup.py install

From looking at the error trace, it seems to be related to tensorflow, which the udacity argument installs for you, so that may be the issue.


It might also be worth checking whether your default python points to Python 3. Try running

python -V

to check.
In some systems the default Python version is still 2.7, which won't work afaik.

@beatrizsmg it worked?

yes, thank you!

Great! Closing this issue :D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iamtrask picture iamtrask  路  4Comments

gmuraru picture gmuraru  路  4Comments

deevashwer picture deevashwer  路  4Comments

s-marta picture s-marta  路  4Comments

iamtrask picture iamtrask  路  3Comments