Hi I am new to tensorflow running pything 3.6 and installed tensorflow using pip. I have encountered a problem where when I import it in python it gives me an error:
File "<stdin>", line 1, in <module>
File "C:\Users\Usman Ali\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 22, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\Usman Ali\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\__init__.py", line 52, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "C:\Users\Usman Ali\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
File "C:\Users\Usman Ali\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: The specified procedure could not be found.
I researched and found solution that it might be Visual C++ Reditributable needs to be installed but I have installed it restarted but still same error. Any solution to this problem.
Related
I've just used pip to install Tensorflow on my computer, which was successful (Win10). When I try to import Tensorflow in my code, it gives the following error messages.
Attempted to revert to tensorflow v1.5 as per other responses.
Python code:
import tensorflow
Error:
File "code-basics.py", line 1, in <module>
import tensorflow
File "C:\Users\[user]\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Users\[user]\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\__init__.py", line 52, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "C:\Users\[user]\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
File "C:\Users\[user]\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: The specified procedure could not be found.
I am working on designing a chatbot using tensorflow in python, I have windows 10 (64 bit) installed with python version 3.6.0.
when trying to execute Python inference.py I got the following error
Traceback (most recent call last):
File "inference.py", line 9, in
from nmt import nmt
File "C:\Users\Ali\Documents\Visual Studio 2017\Projects\SequenceToSequenceModel\nmt-chatbot/nmt\nmt\nmt.py", line 26, in
import tensorflow as tf
File "C:\Users\Ali\AppData\Roaming\Python\Python36\site-packages\tensorflow__init__.py", line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\Ali\AppData\Roaming\Python\Python36\site-packages\tensorflow\python__init__.py", line 59, in
from tensorflow.core.framework.graph_pb2 import *
File "C:\Users\Ali\AppData\Roaming\Python\Python36\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in
from google.protobuf import descriptor as _descriptor
File "c:\users\ali\appdata\roaming\python\python36\site-packages\google\protobuf\descriptor.py", line 47, in
from google.protobuf.pyext import _message
ImportError: DLL load failed: The specified procedure could not be found.
I appreciate any help you provide.
I am trying to write a simple character recolonization code using convolutional neural network in python on windows. I am following this tutorial. But somehow I am having following error message. I could not find the appropriate reason of this error. It would be helpful for me if anyone can breakdown the error with probable solution.
Using TensorFlow backend.
Traceback (most recent call last):
File "C:/Users/Mahin/PycharmProjects/characterRecognization/Learning/practice.py", line 2, in <module>
from keras.datasets import mnist
File "C:\Users\Mahin\PycharmProjects\characterRecognization\venv3.6\lib\site-packages\keras\__init__.py", line 3, in <module>
from . import utils
File "C:\Users\Mahin\PycharmProjects\characterRecognization\venv3.6\lib\site-packages\keras\utils\__init__.py", line 6, in <module>
from . import conv_utils
File "C:\Users\Mahin\PycharmProjects\characterRecognization\venv3.6\lib\site-packages\keras\utils\conv_utils.py", line 9, in <module>
from .. import backend as K
File "C:\Users\Mahin\PycharmProjects\characterRecognization\venv3.6\lib\site-packages\keras\backend\__init__.py", line 89, in <module>
from .tensorflow_backend import *
File "C:\Users\Mahin\PycharmProjects\characterRecognization\venv3.6\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in <module>
import tensorflow as tf
File "C:\Users\Mahin\PycharmProjects\characterRecognization\venv3.6\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\Mahin\PycharmProjects\characterRecognization\venv3.6\lib\site-packages\tensorflow\python\__init__.py", line 59, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "C:\Users\Mahin\PycharmProjects\characterRecognization\venv3.6\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
File "C:\Users\Mahin\PycharmProjects\characterRecognization\venv3.6\lib\site-packages\google\protobuf\descriptor.py", line 47, in <module>
from google.protobuf.pyext import _message
ImportError: DLL load failed: The specified procedure could not be found.
Check if you have installed CUDA, CUDNN, added them to your PATH variable, and if you have correct versions of them for your Tensorflow version (each Tensorflow version supports only range of CUDA versions), check for example this tutorial for installation.
Also, I guess you try to install it on windows (based on the DLL error), which is quite important to mention.
Check import tensorflow.keras... or import keras...
Keras switched to tensorflow.keras, which is a part of tensorflow>=1.10.0.
Maybe it will help.
i have installed tensorflow in virtualenv as well as regular system install and added all the required directories to Path
i am using python 3.6.0
installed tensorflow cpu only
import tensorflow as tf
Throws:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\env\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-
import
File "C:\env\lib\site-packages\tensorflow\python\__init__.py", line 59, in
<module>
from tensorflow.core.framework.graph_pb2 import *
File "C:\env\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line
6, in <module>
from google.protobuf import descriptor as _descriptor
File "C:\env\lib\site-packages\google\protobuf\descriptor.py", line 47, in
<module>
from google.protobuf.pyext import _message
ImportError: DLL load failed: The specified procedure could not be found.
Please upgrade your Python Version from 3.6.0 to 3.6.1 and your issue will be resolved.
For more information, please refer Github Issue 1 and Github Issue 2
I am using a 64 bit windows OS and I successfully installed tensorflow but on importing it in python 3.6 , I am getting the following error.
Please tell how to fix this.
import tensorflow
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import tensorflow
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\__init__.py", line 59, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
File "C:\Users\Administrator\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: The specified procedure could not be found.