Home > other >  TensorFlow: AttributeError: module 'TensorFlow' has no attribute 'constant'
TensorFlow: AttributeError: module 'TensorFlow' has no attribute 'constant'

Time:09-28

TensorFlow small white, TensorFlow study after installation to develop any of the following


ERROR: root: Internal Python ERROR in the inspect module.
Below is the traceback the from this internal error.

Traceback (the most recent call last) :
The File "C: \ ProgramData \ Anaconda3 \ lib \ site - packages \ IPython \ core \ interactiveshell py", line 3326, in run_code
Exec (code_obj, self user_global_ns, self user_ns)
File "
M1=tf. Constant ([[3, 3]])
AttributeError: module 'tensorflow' has no attribute 'constant'

During handling of the above exception, another exception occurred:

Traceback (the most recent call last) :
The File "C: \ ProgramData \ Anaconda3 \ lib \ site - packages \ IPython \ core \ interactiveshell py", line 2040, in showtraceback
STB=value. _render_traceback_ ()
AttributeError: 'AttributeError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

Traceback (the most recent call last) :
The File "C: \ ProgramData \ Anaconda3 \ lib \ site - packages \ tensorflow_core \ python \ pywrap_tensorflow py", 58, line in & lt; module>
The from tensorflow. Python. Pywrap_tensorflow_internal import *
The File "C: \ ProgramData \ Anaconda3 \ lib \ site - packages \ tensorflow_core \ python \ pywrap_tensorflow_internal py", 28, the line in & lt; module>
_pywrap_tensorflow_internal=swig_import_helper ()
The File "C: \ ProgramData \ Anaconda3 \ lib \ site - packages \ tensorflow_core \ python \ pywrap_tensorflow_internal py", line 24, in swig_import_helper
_mod=imp. Load_module (' _pywrap_tensorflow_internal, fp, the pathname, description)
The File "C: \ ProgramData \ Anaconda3 \ lib \ imp py", line 242, in the load_module
Return load_dynamic (name, filename, file)
The File "C: \ ProgramData \ Anaconda3 \ lib \ imp py", line 342, in load_dynamic
Return _load (spec)
ImportError: DLL load failed: could not find the specified module,

During handling of the above exception, another exception occurred:

Traceback (the most recent call last) :
The File "C: \ ProgramData \ Anaconda3 \ lib \ site - packages \ IPython \ core \ ultratb py", line 1101, in get_records
Return _fixed_getinnerframes (etb, number_of_lines_of_context tb_offset)
The File "C: \ ProgramData \ Anaconda3 \ lib \ site - packages \ IPython \ core \ ultratb py", line 319, wrapped in
Return (* args, f * * kwargs)
The File "C: \ ProgramData \ Anaconda3 \ lib \ site - packages \ IPython \ core \ ultratb py", line 353, in _fixed_getinnerframes
Records=fix_frame_records_filenames (inspect. Getinnerframes (etb, context))
The File "C: \ ProgramData \ Anaconda3 \ lib \ inspect py", line 1502, in getinnerframes
Frameinfo=(TB) tb_frame,) + getframeinfo (TB, context)
The File "C: \ ProgramData \ Anaconda3 \ lib \ inspect py", line 1460, in getframeinfo
Filename=getsourcefile (frame) or getfile (frame)
The File "C: \ ProgramData \ Anaconda3 \ lib \ inspect py", line 696, in getsourcefile
If getattr (getmodule (object, filename), '__loader__, None) is not None:
The File "C: \ ProgramData \ Anaconda3 \ lib \ inspect py", line 733, in getmodule
If ismodule (module) and hasattr (module, '__file__) :
File "C: \ ProgramData \ Anaconda3 \ lib \ site - packages \ tensorflow \ set py", line, 50 in __getattr__
The module=self. _load ()
File "C: \ ProgramData \ Anaconda3 \ lib \ site - packages \ tensorflow \ set py", line 44, in _load
The module=_importlib. Import_module (self. __name__)
The File "C: \ ProgramData \ Anaconda3 \ lib \ importlib \ set py", line 127, in import_module
Return _bootstrap. _gcd_import (name [level:], package, level)
File "File "File "File "File "File "File "File "File "File "The File "C: \ ProgramData \ Anaconda3 \ lib \ site - packages \ tensorflow_core \ set py", line 42, in & lt; module>
From the _api. V2 import audio
The File "C: \ ProgramData \ Anaconda3 \ lib \ site - packages \ audio \ \ tensorflow_core \ _api \ v2 set py", line 10, the in & lt; module>
The from tensorflow. Python. Ops. Gen_audio_ops import decode_wav
The File "C: \ ProgramData \ Anaconda3 \ lib \ site - packages \ tensorflow_core \ python \ ops \ gen_audio_ops py", line 9, the in & lt; module>
The from tensorflow. Python import pywrap_tensorflow as _pywrap_tensorflow
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related