Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After installation: ModuleNotFoundError: No module named 'tensorflow_probability' #103

Closed
jalajthanaki opened this issue Jul 10, 2018 · 3 comments

Comments

@jalajthanaki
Copy link

jalajthanaki commented Jul 10, 2018

I got this installation issue. If anyone can help me to resolve it.

I have executed the following commands for installation:

sudo pip3 install tensorflow
sudo pip3 install --user --upgrade tfp-nightly
sudo pip3 install tensorflow-probability

Detail Error Traceback is given below

>>> import tensorflow as tf
>>> tf.__version__
'1.8.0'
>>> import tensorflow_probability as tfp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorflow_probability'

I'm using python 3.6, tensorflow CPU version 1.8.0, OS : Ubuntu 18.04

Any help or suggestions are highly appreciated.

@jalajthanaki jalajthanaki changed the title After installtion After installation: ModuleNotFoundError: No module named 'tensorflow_probability' Jul 10, 2018
@csuter
Copy link
Member

csuter commented Jul 10, 2018

Hi Jalaj, I'm a bit confused by this sequence of commands. If you're using --user to install, you should use it for all the pip commands. This argument tells pip to install in a user-specific directory instead of system wide. Also, if you're using --user you don't need to run as root (sudo) since it's going to install into a directory owned by your user. Finally, it seems you're install TFP using two pip package names: tfp-nightly and tensorflow-probability. The latter isn't fully supported yet -- we're working on our first stable versioned release right now. So you'll want to avoid using that pip package for now. I'd suggest undoing those commands by running these:

# Use sudo just in case the user-local files were installed with root ownership
sudo pip3 uninstall --user tfp-nightly
sudo pip3 uninstall tensorflow-probability

Then start over with just tfp-nightly. Since you've installed tensorflow system-wide, you may want to install TFP system-wide too for consistency:

sudo pip3 install --upgrade tfp-nightly

Please give this a try and ping the thread if it doesn't work.

@jalajthanaki
Copy link
Author

Hi csuter,
Thank you for your reply and guiding me. The suggestion has been worked out for me.

@csuter
Copy link
Member

csuter commented Jul 10, 2018

Great, glad it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants