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
  Python Package for deploying python code in Excel on machines without python UGuntupalli 2 3,240 Jul-31-2019, 04:05 AM
Last Post: UGuntupalli
  Tensorflow offline build from source on CentOS 7 riotto 3 549 Mar-21-2019, 07:16 PM
Last Post: riotto
  tensorflow stopped after numpy install Devilish 0 501 Dec-28-2018, 09:29 PM
Last Post: Devilish
  error on stock indicator code on balance volume yatish 19 2,147 Dec-14-2018, 05:40 PM
Last Post: yatish
  Logistic regression with Tensorflow kiton 1 462 Nov-28-2018, 07:34 PM
Last Post: kiton
  panda, excel - script pauses and doesn't continue running, no error message william 1 406 Nov-24-2018, 01:24 AM
Last Post: ichabod801
  Installing Tensorflow-GPU Help junzhi 1 775 Oct-04-2018, 12:40 PM
Last Post: Larz60+
  TensorFlow problem in Object Detection yksingh1097 1 603 Oct-03-2018, 09:57 PM
Last Post: Larz60+
  Installing Tensorflow-GPU junzhi 2 841 Sep-30-2018, 07:43 AM
Last Post: junzhi
  Tensorflow issues JarethGawain 1 761 Sep-27-2018, 01:59 PM
Last Post: gontajones

Forum Jump:


Users browsing this thread: 1 Guest(s)