Tensorflow no se es...
 

Tensorflow no se está ejecutando en Windows 10  

  RSS
Armando
(@armando)
Active Member

Soy nuevo en tensorflow (dos mese y medio). Instalé python y tensorflow. Estoy obteniendo el error después de ejecutar mi código de muestra.

He instalado tensorflow. Vi que el comando siguiente parece para Mac, pero he usado este comando solo para instalar tensorflow, se ha instalado correctamente. No recibí el enlace para Windows, es por eso que utilicé el siguiente enlace. Si alguien conoce el enlace de instalación de windows actual para tensorflow, por favor comparta y brinde una solución para el siguiente problema.

pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.5.0-py3-none-any.whl

Python 3.7.0, pip 18.0, tenserflow 1.5.0, windows 10

import tensorflow as tf

sess = tf.Session()

hello = tf.constant("Hellow")
print(sess.run(hello))

a = tf.constant(20)
b = tf.constant(22)

print('a + b = {0}'.format(sess.run(a+b)))

PS F: \ tensorflow> python. \ Installation_test.py

PS F:\tensorflow> python .\installation_test.py
Traceback (most recent call last):
File "C:\Users\thava\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",
line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])
File "C:\Users\thava\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\thava\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\__init__.py", line 66,
in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\thava\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",
line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "C:\Users\thava\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",
line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File ".\installation_test.py", line 1, in <module>
import tensorflow as tf
File "C:\Users\thava\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Users\thava\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\__init__.py", line 72,
in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\thava\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",
line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])
File "C:\Users\thava\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\thava\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\__init__.py", line 66,
in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\thava\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",
line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "C:\Users\thava\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",
line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'

 

Failed to load the native TensorFlow runtime.

See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error

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

Citar
Respondido : 22/09/2018 11:56 pm
German M
(@german-m)
Active Member

En primer lugar, para Windows no hay un enlace directo, tienes que hacerlo desde la fuente. Consulte este enlace para ver las ventanas: https://www.tensorflow.org/install/source_windows

¿Estás seguro de que has instalado Python correctamente? Intente ejecutar un comando python básico como imprimir 'hello world' para verificar si está configurado.

ResponderCitar
Respondido : 23/09/2018 3:28 pm
Share:
  
Trabajando

Por favor Iniciar Sesión o Registro