tensorflow / tensorflow/privacy

ModuleNotFoundError: No module named 'tensorflow_privacy'

Open
#120 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
477
Avg merge
22h 12m
Merged PRs (30d)
1

Description

Trying to import tensorflow_privacy I get the following error. My tensorflow version is 1.14.0 and I am trying to import the command on a jupyter notebook. I install the library using

!pip install tensorflow_privacy

and everything is successfully installed but when I run import I get an error message

from tensorflow_privacy.privacy.analysis import compute_dp_sgd_privacy
from tensorflow_privacy.privacy.optimizers.dp_optimizer import DPGradientDescentGaussianOptimizer
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-13-080e2fd713ec> in <module>
----> 1 from tensorflow_privacy.privacy.analysis import compute_dp_sgd_privacy
      2 from tensorflow_privacy.privacy.optimizers.dp_optimizer import DPGradientDescentGaussianOptimizer

ModuleNotFoundError: No module named 'tensorflow_privacy'

How do I fix this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two imports in the Jupyter notebook after checking which Python environment the kernel uses and where tensorflow_privacy was installed. Compare that environment with the reported TensorFlow 1.14.0 setup. Done means both imports succeed without ModuleNotFoundError.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.