No module named 'tensorflow'

1,400 views
Skip to first unread message

rostislav...@gmail.com

unread,
Jan 10, 2020, 10:54:05 PM1/10/20
to Keras-users
Dear
I installed keras yesterday using command
pip install keras

but it's not working

I do this:

import pandas as pd

from keras.models import Sequential

tr = pd.read_csv('c:\\1\\ph\\st\\tr.csv' , sep=',')
res = pd.read_csv('c:\\1\\ph\\st\\res.csv' , sep=',')

print(tr.head())



And can see the error


Using TensorFlow backend.
Traceback (most recent call last):
  File "C:\1\ph\st\st.py", line 8, in <module>
    from keras.models import Sequential
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python38\lib\site-packages\keras\__init__.py", line 3, in <module>
    from . import utils
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python38\lib\site-packages\keras\utils\__init__.py", line 6, in <module>
    from . import conv_utils
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python38\lib\site-packages\keras\utils\conv_utils.py", line 9, in <module>
    from .. import backend as K
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python38\lib\site-packages\keras\backend\__init__.py", line 1, in <module>
    from .load_backend import epsilon
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python38\lib\site-packages\keras\backend\load_backend.py", line 90, in <module>
    from .tensorflow_backend import *
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python38\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in <module>
    import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'

Process returned 1 (0x1)        execution time : 1.245 s

Sergey O.

unread,
Jan 11, 2020, 12:04:16 AM1/11/20
to rostislav...@gmail.com, Keras-users
Can you try:
pip install tensorflow

--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/09e12270-0124-479e-8e43-81dd8829066b%40googlegroups.com.

Khemra

unread,
Jan 11, 2020, 12:07:12 AM1/11/20
to Keras-users
I forget but I think it’s ‘tensorflow.keras’ instead

Rostislav Telitsin

unread,
Jan 11, 2020, 1:06:46 AM1/11/20
to Khemra, Keras-users
Actually I used python 3.8 
I changed to 3.6 and install tensorflow 

but now I have new error

 File "C:\Users\rosti\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\utils\__init__.py", line 6, in <module>
    from . import conv_utils
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\utils\conv_utils.py", line 9, in <module>

    from .. import backend as K
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\backend\__init__.py", line 1, in <module>
    from .load_backend import epsilon
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\backend\load_backend.py", line 90, in <module>
    from .tensorflow_backend import *
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in <module>
    import tensorflow as tf
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 101, in <module>
    from tensorflow_core import *
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_core\__init__.py", line 40, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
    module = self._load()
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python36\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_core\python\__init__.py", line 64, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_core\core\framework\graph_pb2.py", line 7, in <module>
    from google.protobuf import descriptor as _descriptor
  File "C:\Users\rosti\AppData\Local\Programs\Python\Python36\lib\site-packages\google\protobuf\descriptor.py", line 47, in <module>
    from google.protobuf.pyext import _message
ImportError: DLL load failed: Не найдена указанная процедура.

Process returned 1 (0x1)        execution time : 1.654 s
Для продолжения нажмите любую клавишу . . .

сб, 11 янв. 2020 г. в 12:07, Khemra <idkfa...@gmail.com>:
I forget but I think it’s ‘tensorflow.keras’ instead

--
You received this message because you are subscribed to a topic in the Google Groups "Keras-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/keras-users/2LUFvvJ8xQw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to keras-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/e59bb1fe-e057-4496-8263-8bd53681a40b%40googlegroups.com.

Sergey O.

unread,
Jan 11, 2020, 1:25:17 AM1/11/20
to Rostislav Telitsin, Khemra, Keras-users
Why not just avoid all the troubles in the world?
:D

You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/CAOWQPjx7uhFv6m1muTv3GeoBL%3DLW7%3DThYf%2Btyi6TRTFWryZE5A%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages