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.
Related
Here's the full error:
Traceback (most recent call last):
File "C:\Users\richa\Documents\_Projects_\Astr0loger\interface.py", line 26, in <module>
from controller import choose_best_stocks
File "C:\Users\richa\Documents\_Projects_\Astr0loger\controller.py", line 10, in <module>
from trainer import get_data, train_model, test_model
File "C:\Users\richa\Documents\_Projects_\Astr0loger\trainer.py", line 12, in <module>
import tensorflow as tf
File "C:/Users/richa/Documents/_Projects_/Astr0loger/astrology_env/Lib/site-packages\tensorflow\__init__.py", line 41, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:/Users/richa/Documents/_Projects_/Astr0loger/astrology_env/Lib/site-packages\tensorflow\python\__init__.py", line 40, in <module>
from tensorflow.python.eager import context
File "C:/Users/richa/Documents/_Projects_/Astr0loger/astrology_env/Lib/site-packages\tensorflow\python\eager\context.py", line 35, in <module>
from tensorflow.python import pywrap_tfe
File "C:/Users/richa/Documents/_Projects_/Astr0loger/astrology_env/Lib/site-packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:/Users/richa/Documents/_Projects_/Astr0loger/astrology_env/Lib/site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:/Users/richa/Documents/_Projects_/Astr0loger/astrology_env/Lib/site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: The specified module could not be found.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Apparently there are three common causes/fixes to the problem:
Python is 32 bit while the system is 64 bit, or vice versa. I checked, that is not the case.
cpu doesn't support AVX2 instructions - I tried tensorflow-gpu, same issue, so I don't think that's it
You need to install the MSVC 2019 redistributable - I checked, I have it
AAAAAAAAAAH What do I do?
Well, turns out the error was fixed by installing an older version of Tensorflow; 2.0.0. If you're having the same issue, try several versions of tensorflow.
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.
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.