# Help on AttributeError: module ‘tensorflow.python.util.compat’ has no attribute ‘v1’

**URL:** <https://forum.rasa.com/t/help-on-attributeerror-module-tensorflow-python-util-compat-has-no-attribute-v1/24226>\
**Category:** Getting Started with Rasa\
**Created:** [January 31, 2020, 6:50pm UTC](https://forum.rasa.com/t/help-on-attributeerror-module-tensorflow-python-util-compat-has-no-attribute-v1/24226 "2020-01-31T18:50:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nanda](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@Nanda](https://forum.rasa.com/u/Nanda)\
**Post date:** [January 31, 2020, 6:50pm UTC](https://forum.rasa.com/t/help-on-attributeerror-module-tensorflow-python-util-compat-has-no-attribute-v1/24226/1 "2020-01-31T18:50:02Z")

</div>

Hi all, I am a Rasa newbie, somehow installed (after crossing the tensorflow import issue) on an old Windows 10 PC and ran rasa init. I got the following error: AttributeError: module ‘tensorflow.python.util.compat’ has no attribute ‘v1’.

Can someone help on how to set this right?

FYI, initially, I was getting tensorflow import errors when I ran rasa init, so I fished around and installed tensorflow with this, which got me past the import issue:

pip install tensorflow-1.6.0-cp36-cp36m-win\_amd64.whl

Thanx.

* * *

The full screen dump is as follows:

## C:\Xtra\Rasa\>rasa init c:\xtra\python\python36\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\_qint8 = np.dtype([(“qint8”, np.int8, 1)]) c:\xtra\python\python36\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\_quint8 = np.dtype([(“quint8”, np.uint8, 1)]) c:\xtra\python\python36\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\_qint16 = np.dtype([(“qint16”, np.int16, 1)]) c:\xtra\python\python36\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\_quint16 = np.dtype([(“quint16”, np.uint16, 1)]) c:\xtra\python\python36\lib\site-packages\tensorflow\python\framework\dtypes.py:521: 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:\xtra\python\python36\lib\site-packages\tensorflow\python\framework\dtypes.py:526: 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)]) Traceback (most recent call last): File “c:\xtra\python\python36\lib\runpy.py”, line 193, in \*run\_module\_as\_main “ **main** ”, mod\_spec) File “c:\xtra\python\python36\lib\runpy.py”, line 85, in \*run\_code exec(code, run\_globals) File "C:\Xtra\Python\Python36\Scripts\rasa.exe main\* .py", line 7, in File "c:\xtra\python\python36\lib\site-packages\rasa_ _main_\* .py", line 69, in main set\_log\_level(log\_level) File “c:\xtra\python\python36\lib\site-packages\rasa\utils\common.py”, line 68, in set\_log\_level update\_tensorflow\_log\_level() File “c:\xtra\python\python36\lib\site-packages\rasa\utils\common.py”, line 120, in update\_tensorflow\_log\_level tf\_log\_level = tf.compat.v1.logging.ERROR AttributeError: module ‘tensorflow.python.util.compat’ has no attribute ‘v1’

## C:\Xtra\Rasa\>pip show tensorflow Name: tensorflow Version: 1.6.0 Summary: TensorFlow helps the tensors flow Home-page: [https://www.tensorflow.org/](https://www.tensorflow.org/) Author: Google Inc. Author-email: [opensource@google.com](mailto:opensource@google.com) License: Apache 2.0 Location: c:\xtra\python\python36\lib\site-packages Requires: astor, six, absl-py, termcolor, wheel, tensorboard, protobuf, numpy, gast, grpcio Required-by: rasa

---

<div class="post-metadata">

**Author:** ![dakshvar22](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dakshvar22/32/3993_2.png) [@dakshvar22](https://forum.rasa.com/u/dakshvar22)\
**Post date:** [February 5, 2020, 10:06am UTC](https://forum.rasa.com/t/help-on-attributeerror-module-tensorflow-python-util-compat-has-no-attribute-v1/24226/2 "2020-02-05T10:06:23Z")

</div>

If you start with a clean environment and install `rasa==1.7.0`, everything should work as expected.
