openai / gpt-2

Code for the paper "Language Models are Unsupervised Multitask Learners"
https://openai.com/blog/better-language-models/
Other
22.57k stars 5.53k forks source link

ModuleNotFoundError with TensorFlow #291

Open xndr-code opened 3 years ago

xndr-code commented 3 years ago

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.

W1Real commented 3 years ago

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

xndr-code commented 3 years ago

thank yuo, aweome

xndr-code commented 3 years ago

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 commented 3 years ago

I'm using anaconda if that helps

gwc4github commented 3 years ago

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.