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

ModuleNotFoundError: No module named 'tensorflow.contrib' #137

Open
TheCodingRecruiter opened this issue Nov 8, 2019 · 11 comments
Open

Comments

@TheCodingRecruiter
Copy link

I had ran the program initially and I didn't have tensorflow installed and so got a module error telling me that Tensorflow wasn't installed. Then I pip installed it and now I am getting this error. I googled this error, and have found out that TF 1.14 moved contrib to contrib.trt. Since I just installed TF and have the most recent version, this may be why I am encountering the error, but I don't see it listed in the requirements txt on the repo, so I am unsure. Can you assist? For the record, I am trying to run this within pythonanywhere.

@WAUthethird
Copy link

WAUthethird commented Nov 8, 2019

You’re positive that you have Tensorflow 1, not 2 installed? GPT-2-Simple doesn’t support TF 2.

@TheCodingRecruiter
Copy link
Author

Nope. That must be what it is. I have TF 2. I'll uninstall and install the right version. What version is the last version? TF 1.13?

@WAUthethird
Copy link

It is TF 1.15.

@minimaxir
Copy link
Owner

Yes, that is a TF 2.0 warning, currently this package doesn't support it.

@mobyte0
Copy link

mobyte0 commented Nov 13, 2019

Why not add tensorflow==1.14 to requirements.txt?

@minimaxir
Copy link
Owner

Because tensorflow has two flavors: CPU (tensorflow) and GPU (tensorflow-gpu) and I do not want to force one or the other.

@arnicas
Copy link

arnicas commented Nov 23, 2019

I just hit this too, and was coming to say add it to requiremnts :) Oh well!

@minimaxir
Copy link
Owner

I am open to adding a hard assert if the tf package version >= 2.0.0.

minimaxir added a commit that referenced this issue Dec 1, 2019
@minimaxir
Copy link
Owner

The assert is added; let me know if the copy needs to be more clear.

@arlyon
Copy link

arlyon commented Dec 24, 2019

What would it take to port this to 2.0? I have a project that already uses 2.0

@samcamwilliams
Copy link

This tripped me up, too. Apparently tensorflow 1.15 supports both CPU and GPU execution. Is there no way that we can add tensorflow==1.15 to the dockerfile?

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

7 participants