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

TensorFlow Error - Any Workaround please? #16

Open
rohit1409 opened this issue Feb 21, 2023 · 1 comment
Open

TensorFlow Error - Any Workaround please? #16

rohit1409 opened this issue Feb 21, 2023 · 1 comment

Comments

@rohit1409
Copy link

E:\picoGPT-main>python gpt2.py "Alan Turing theorized that computers would one day become"
Traceback (most recent call last):
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [dirname(file)])
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\Lib\imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
import _pywrap_tensorflow_internal
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\picoGPT-main\gpt2.py", line 121, in
fire.Fire(main)
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\fire\core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\fire\core.py", line 475, in _Fire
component, remaining_args = CallAndUpdateTrace(
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\fire\core.py", line 691, in CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "E:\picoGPT-main\gpt2.py", line 98, in main
from utils import load_encoder_hparams_and_params
File "E:\picoGPT-main\utils.py", line 7, in
import tensorflow as tf
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow_init
.py", line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python_init
.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [dirname(file)])
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\Lib\imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\AlanT\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
import _pywrap_tensorflow_internal
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.

@AbdelAzizMohamedMousa
Copy link

It looks like there is an error related to TensorFlow not being able to load a required module. Have you installed TensorFlow and its dependencies correctly? You may want to try reinstalling TensorFlow and ensure that all required dependencies are installed.

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