AttributeError: module 'tensorflow.python.framework.ops' has no attribute '_set_call_cpp_shape_fn' #40053
Labels
stale
This label marks the issue/pr stale - to be closed automatically if no activity
stat:awaiting response
Status - Awaiting response from author
subtype:windows
Windows Build/Installation Issues
TF 1.14
for issues seen with TF 1.14
type:build/install
Build and install issues
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information
Describe the problem
I am trying to run a .py program from the anaconda prompt. The program is using tensorflow and keras. I have set up a new condo environment and tried to install tensorflow and keras using both pip and conda. Once in this environment I try to run the code and it produces the error message:
AttributeError: module 'tensorflow.python.framework.ops' has no attribute '_set_call_cpp_shape_fn'
Provide the exact sequence of commands / steps that you executed before running into the problem
I activate my new environment, change to the directory of my code, the call python vad.py.
Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
(PythonCPU) C:\Users\User\Documents\SpeechRecognition\task4>python vad.py
C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
Using TensorFlow backend.
Traceback (most recent call last):
File "vad.py", line 3, in
import tensorflow as tf
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow_init.py", line 28, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python_init.py", line 63, in
from tensorflow.python.framework.framework_lib import * # pylint: disable=redefined-builtin
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\framework_lib.py", line 25, in
from tensorflow.python.framework.ops import Graph
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\ops.py", line 54, in
from tensorflow.python.platform import app
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\platform\app.py", line 23, in
from absl.app import run as run
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\absl\app.py", line 35, in
import pdb
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\pdb.py", line 76, in
import code
File "C:\Users\User\Documents\SpeechRecognition\task4\code.py", line 4, in
import keras
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\keras_init.py", line 3, in
from . import utils
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\keras\utils_init.py", line 6, in
from . import conv_utils
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\keras\utils\conv_utils.py", line 9, in
from .. import backend as K
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\keras\backend_init.py", line 1, in
from .load_backend import epsilon
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\keras\backend\load_backend.py", line 90, in
from .tensorflow_backend import *
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\keras\backend\tensorflow_backend.py", line 9, in
from tensorflow.python.ops import image_ops as tf_image_ops
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\ops\image_ops.py", line 28, in
from tensorflow.python.ops.gen_image_ops import *
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\ops\gen_image_ops.py", line 19, in
from tensorflow.python.framework import common_shapes as _common_shapes
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 729, in
ops._set_call_cpp_shape_fn(call_cpp_shape_fn)
AttributeError: module 'tensorflow.python.framework.ops' has no attribute '_set_call_cpp_shape_fn'
The text was updated successfully, but these errors were encountered: