tensorflow: AttributeError: module 'tensorboard' has no attribute 'lazy'
I’ve been trying to import tensorflow, downloading Anaconda 3, creating virtual environment, use pip install tensorflow, pip install keras and when I try to import tensorflow an error occured “Failed to load the native TensorFlow runtime.” then I tried to resolve it by downloading cygwin to update the gcc. After that, another error occured
2020-01-21 16:18:17.197417: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2020-01-21 16:18:17.197832: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Tried to solve it by downloading CUDA 10.1 version and now the problem is
2020-03-09 14:17:07.528838: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
This is a problem because after that all process finished with exit code 1 and print(‘test’) cannot even be processed after this.
System information: Anaconda 3 Windows 10 Tensorflow 2.1 Inteil Core I5 Gtx 1050 ti CUDA version 10.1 python version 3.6.1
Describe the problem Describe the problem clearly here. Be sure to convey here why it’s a bug in TensorFlow or a feature request.
The errors when I try to import tensorflow:
2020-03-09 14:17:07.528838: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
Traceback (most recent call last):
File "C:/Users/User/PycharmProjects/tensortest/test.py", line 1, in <module>
import tensorflow
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorflow\__init__.py", line 101, in <module>
from tensorflow_core import *
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorflow_core\__init__.py", line 46, in <module>
from . _api.v2 import compat
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorflow_core\_api\v2\compat\__init__.py", line 39, in <module>
from . import v1
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorflow_core\_api\v2\compat\v1\__init__.py", line 32, in <module>
from . import compat
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorflow_core\_api\v2\compat\v1\compat\__init__.py", line 39, in <module>
from . import v1
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorflow_core\_api\v2\compat\v1\compat\v1\__init__.py", line 29, in <module>
from tensorflow._api.v2.compat.v1 import app
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorflow_core\_api\v2\compat\__init__.py", line 39, in <module>
from . import v1
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorflow_core\_api\v2\compat\v1\__init__.py", line 32, in <module>
from . import compat
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorflow_core\_api\v2\compat\v1\compat\__init__.py", line 40, in <module>
from . import v2
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorflow_core\_api\v2\compat\v1\compat\v2\__init__.py", line 30, in <module>
from tensorflow._api.v2.compat.v2 import audio
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorflow_core\_api\v2\compat\v2\__init__.py", line 33, in <module>
from . import compat
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorflow_core\_api\v2\compat\v2\compat\__init__.py", line 40, in <module>
from . import v2
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorflow_core\_api\v2\compat\v2\compat\v2\__init__.py", line 320, in <module>
from tensorboard.summary._tf import summary
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorboard\summary\__init__.py", line 31, in <module>
from tensorboard.summary import v2
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorboard\summary\v2.py", line 24, in <module>
from tensorboard.plugins.audio.summary_v2 import audio
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorboard\plugins\audio\summary_v2.py", line 30, in <module>
from tensorboard.compat import tf2 as tf
File "C:\Users\User\Anaconda3\envs\tensortest\lib\site-packages\tensorboard\compat\__init__.py", line 28, in <module>
import tensorboard.lazy as _lazy
AttributeError: module 'tensorboard' has no attribute 'lazy'
Process finished with exit code 1
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 32 (4 by maintainers)
pip uninstall tensorflow-tensorboardpip install tensorboardhad the same problem and this fixed it, hope it helps. Also keep an eye on versions and your virtual env
I have the same problem.
the output of `pip list`:
the output of `pip debug --verbose`:
For
import tensorflow as tfthis is the output:and for
tf.test.is_gpu_available()the output is:I tried also with Tensorboard 2.2.0, the same problem remains
Update your ‘NVIDIA Graphics Driver’ with latest and compatible version for your PC. Download Driver: https://www.nvidia.com/Download/index.aspx# To find out required driver: https://youtu.be/a6ZdiNBPCC8