tf-encrypted: Module for secure randomness not loaded when installed from PyPI package

TFE installed via pip will currently not load the secure randomness module. Error seems to come from TensorFlow:

>>> secure_random_module = tf.load_op_library(shared_object)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/miniconda3/envs/tfe-release-py35/lib/python3.5/site-packages/tensorflow/python/framework/load_library.py", line 61, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: dlopen(/usr/local/miniconda3/envs/tfe-release-py35/lib/python3.5/site-packages/tf_encrypted/operations/secure_random/secure_random_module_tf_1.13.1.so, 6): no suitable image found.  Did find:
	/usr/local/miniconda3/envs/tfe-release-py35/lib/python3.5/site-packages/tf_encrypted/operations/secure_random/secure_random_module_tf_1.13.1.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
	/usr/local/miniconda3/envs/tfe-release-py35/lib/python3.5/site-packages/tf_encrypted/operations/secure_random/secure_random_module_tf_1.13.1.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00

Package should come with this for both Python 3.5 and 3.6 and both Linux and macOS.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (19 by maintainers)

Most upvoted comments

Looked into how tf-encrypted is getting installed on windows and it looks like it just installs the source tarball if there’s no wheel available. I think we should either not upload the tarball or add to the secure randomness warning message that it’s not supported on windows.

Yeah not sure what happened there. Maybe had 0.5.2 installed somehow?

I can reproduce this consistently by installing tf-encrypted version 0.5.2 (pip install tf-encrypted==0.5.2) so this release must be broken. Still stumped on how that version even would get installed for syft users. The version is pinned to tf-encrypted 0.5.4. Perhaps this is happening to users with tf-encrypted already installed and for some reason tf-encrypted 0.5.4 isn’t being installed correctly.