gpt-2 icon indicating copy to clipboard operation
gpt-2 copied to clipboard

ModuleNotFoundError with TensorFlow

Open xndr-code opened this issue 4 years ago • 5 comments

I have tried with multiple versions of tensorflow and python (1.12.0, 1.14.0, 1.13.1, 2.4 for tf, 3.9, 3.6.0, and 3.6.5 for python) and every time i try to run any sample the same error message pops up.

(py365) C:\Users\xndrcode\Documents\gpt-2textbot\gpt-2>python3 src/interactive_conditional_samples.py --top_k 40 Traceback (most recent call last): File "C:\Users\speed\Documents\lemondemonbot\gpt-2\src\interactive_conditional_samples.py", line 7, in import tensorflow as tf File "C:\Users\speed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local packages\Python39\site-packages\tensorflow_init_.py", line 41, in from tensorflow.python.tools import module_util as _module_util ModuleNotFoundError: No module named 'tensorflow.python'

is there something i've done wrong? is there any way to fix this? any help would be greatly appreciated! thank you loads! and if any additional information is needed please let me know!

p.s. i apologize, i dont know how to format on github, so that's why the text isnt in a codeblock or anything. sorry again.

xndr-code avatar Apr 29 '21 01:04 xndr-code

It's full of errors with getting the dendencies, I had errors with the version of regex not avaliable, I then manually removed the specific version tag it asks on the "requierements.txt", then errors with c++ compiler not installed on my machine, I had to install it manually, then I had errors with cuda not installed (cudart64_110.dll not avaliable), which I did later on, then the error I face is that there is no tensorflow 1.14 avaliable (which YOU NEED, it seems like anything later than that will give error, I could try to install it from somewhere else, but, I will give up on installing natively, too many dependencies, filled up some extra 5gb on my ssd of dendencies already.

Just run the docker version if you don't mind the extra ram and cpu usage for some quick tests, you will be filled with many other issues to run it, that's not the first error you will face.

https://github.com/openai/gpt-2/blob/master/DEVELOPERS.md#docker-installation

W1Real avatar May 04 '21 03:05 W1Real

thank yuo, aweome

xndr-code avatar May 07 '21 14:05 xndr-code

follow up question, if I could, how do I actually... build the docker file? I don't have docker installed, if thats a thing that's necessary. Again, really sorry, I suck at coding.

xndr-code avatar May 08 '21 01:05 xndr-code

I'm using anaconda if that helps

xndr-code avatar May 08 '21 01:05 xndr-code

follow up question, if I could, how do I actually... build the docker file? I don't have docker installed, if thats a thing that's necessary. Again, really sorry, I suck at coding.

You need to install Docker Desktop.

gwc4github avatar May 08 '21 10:05 gwc4github