Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Newbie at using python and tensorflow getting error when running simple code
#1
Hi, I am trying to use tensorflow but I could not run the code at all. I recieved a very long chain of error, which I am unsure if it is due to my installation problem.
My code is:
import tensorflow as tf

node1 = tf.constant(3.0, tf.float32)
node2 = tf.constant(4.0)
And the error that came out is:
Error:
================ RESTART: C:/Users/user/Desktop/Tensorflow.py ================ Traceback (most recent call last): File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module> _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\imp.py", line 343, in load_dynamic return _load(spec) ImportError: DLL load failed: The specified module could not be found. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:/Users/user/Desktop/Tensorflow.py", line 1, in <module> import tensorflow as tf File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 22, in <module> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module> from tensorflow.python import pywrap_tensorflow File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module> raise ImportError(msg) ImportError: Traceback (most recent call last): File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module> _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\imp.py", line 343, in load_dynamic return _load(spec) ImportError: DLL load failed: The specified module could not be found. Failed to load the native TensorFlow runtime. See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Larz60+ wrote Sep-28-2018, 05:31 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

I have added for you this time. Please use tags on future posts.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  TensorFlow CNN get error - DataType uint8 not in list vokoyo 3 376 Nov-09-2019, 04:03 AM
Last Post: xuanloc97
  TensorFlow get error - array with more than one element is ambiguous vokoyo 3 147 Nov-07-2019, 01:12 PM
Last Post: ThomasL
  Simple numpy reshape error wih contour3D AdeIsHere 0 164 Sep-17-2019, 12:01 PM
Last Post: AdeIsHere
  panda, excel - script pauses and doesn't continue running, no error message william 1 502 Nov-24-2018, 01:24 AM
Last Post: ichabod801
  Python import tensorflow error owenhe 7 2,279 Jun-23-2018, 12:41 PM
Last Post: gontajones
  how to reduce running time of the code dilmailid 6 900 May-18-2018, 02:49 AM
Last Post: scidam
  Request for simple code CuriousMind 5 1,429 Oct-20-2017, 12:10 PM
Last Post: buran
  Psychopy- Python code error Iva09 0 811 Sep-20-2017, 11:15 PM
Last Post: Iva09
  Error while running python script to get pixel points from google static map image python_newbee 3 1,624 Sep-15-2017, 06:25 AM
Last Post: python_newbee
  Code is not running on Windows ertank 7 1,930 Aug-04-2017, 02:07 PM
Last Post: buran

Forum Jump:


Users browsing this thread: 1 Guest(s)