Yum command ModuleNotFoundError on centos 8 - centos8

I have a CentOS 8 server, and tried to install Mysql on it with following commands:
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum update
when I enter yum update, it returns
Traceback (most recent call last):
File "/usr/lib64/python3.6/site-packages/libdnf/common_types.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /lib64/librpmio.so.8: symbol EVP_md2 version OPENSSL_1_1_0 not defined in file libcrypto.so.1.1 with link time reference
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/yum", line 57, in <module>
from dnf.cli import main
File "/usr/lib/python3.6/site-packages/dnf/__init__.py", line 30, in <module>
import dnf.base
File "/usr/lib/python3.6/site-packages/dnf/base.py", line 29, in <module>
import libdnf.transaction
File "/usr/lib64/python3.6/site-packages/libdnf/__init__.py", line 3, in <module>
from . import common_types
File "/usr/lib64/python3.6/site-packages/libdnf/common_types.py", line 17, in <module>
_common_types = swig_import_helper()
File "/usr/lib64/python3.6/site-packages/libdnf/common_types.py", line 16, in swig_import_helper
return importlib.import_module('_common_types')
File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_common_types'
My python is installed via
wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz
tar -zxvf Python-3.8.3.tgz
mkdir /usr/local/python3/
cd Python-3.8.3
./configure --prefix=/usr/local/python3
make
yum install zlib* -y
make install
ln -s /usr/local/python3/bin/python3.8 /usr/bin/python
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip
It seems yum command is using the /usr/lib/python3.6/, which is different from the Python version I am using. How can I fix my yum command?

Related

I am having issue to run my NLP model with JupyterLab on Google Cloud Platform

I am facing a problem running my model on GCP. Everything was working fine before and then one day I was not able to have access to my notebook anymore. I was obliged to create a new notebook and yesterday my tensorflow was disturbing (throwing many messages that I have used to seacrh on google), I followed some steps and my notebook start running and then stop again. When I try to run the notebook now, I get bellow error. I am using PyTorch for my code. Thanks
`
2022-11-01 09:42:23.409310: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-11-01 09:42:23.709259: E tensorflow/stream_executor/cuda/cuda_blas.cc:2981] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2022-11-01 09:42:24.904367: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/usr/local/nccl2/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nccl2/lib:/usr/local/cuda/extras/CUPTI/lib64
2022-11-01 09:42:24.904473: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/usr/local/nccl2/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nccl2/lib:/usr/local/cuda/extras/CUPTI/lib64
2022-11-01 09:42:24.904488: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/transformers/utils/import_utils.py", line 1063, in _get_module
return importlib.import_module("." + module_name, self.__name__)
File "/opt/conda/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/opt/conda/lib/python3.7/site-packages/transformers/data/__init__.py", line 30, in <module>
from .metrics import glue_compute_metrics, xnli_compute_metrics
File "/opt/conda/lib/python3.7/site-packages/transformers/data/metrics/__init__.py", line 22, in <module>
if is_sklearn_available():
File "/opt/conda/lib/python3.7/site-packages/transformers/utils/import_utils.py", line 524, in is_sklearn_available
return is_scipy_available() and importlib.util.find_spec("sklearn.metrics")
File "/opt/conda/lib/python3.7/importlib/util.py", line 94, in find_spec
parent = __import__(parent_name, fromlist=['__path__'])
File "/opt/conda/lib/python3.7/site-packages/sklearn/__init__.py", line 82, in <module>
from .base import clone
File "/opt/conda/lib/python3.7/site-packages/sklearn/base.py", line 17, in <module>
from .utils import _IS_32BIT
File "/opt/conda/lib/python3.7/site-packages/sklearn/utils/__init__.py", line 28, in <module>
from .fixes import np_version, parse_version
File "/opt/conda/lib/python3.7/site-packages/sklearn/utils/fixes.py", line 20, in <module>
import scipy.stats
File "/opt/conda/lib/python3.7/site-packages/scipy/stats/__init__.py", line 441, in <module>
from .stats import *
File "/opt/conda/lib/python3.7/site-packages/scipy/stats/stats.py", line 43, in <module>
from . import distributions
File "/opt/conda/lib/python3.7/site-packages/scipy/stats/distributions.py", line 8, in <module>
from ._distn_infrastructure import (rv_discrete, rv_continuous, rv_frozen)
File "/opt/conda/lib/python3.7/site-packages/scipy/stats/_distn_infrastructure.py", line 24, in <module>
from scipy import optimize
File "/opt/conda/lib/python3.7/site-packages/scipy/optimize/__init__.py", line 400, in <module>
from .optimize import *
File "/opt/conda/lib/python3.7/site-packages/scipy/optimize/optimize.py", line 36, in <module>
from ._numdiff import approx_derivative
File "/opt/conda/lib/python3.7/site-packages/scipy/optimize/_numdiff.py", line 8, in <module>
from ._group_columns import group_dense, group_sparse
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /opt/conda/lib/python3.7/site-packages/scipy/optimize/_group_columns.cpython-37m-x86_64-linux-gnu.so)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "main.py", line 1, in <module>
from training import *
File "/home/jupyter/Ngambay-French-Neural-Machine-Translation-sba_fr_v1-/Baseline/training.py", line 13, in <module>
from transformers import (
File "<frozen importlib._bootstrap>", line 1032, in _handle_fromlist
File "/opt/conda/lib/python3.7/site-packages/transformers/utils/import_utils.py", line 1053, in __getattr__
module = self._get_module(self._class_to_module[name])
File "/opt/conda/lib/python3.7/site-packages/transformers/utils/import_utils.py", line 1068, in _get_module
) from e
RuntimeError: Failed to import transformers.data.data_collator because of the following error (look up to see its traceback):
/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /opt/conda/lib/python3.7/site-packages/scipy/optimize/_group_columns.cpython-37m-x86_64-linux-gnu.so)
`
I have try to search on google but didn't find accurate answer for my problem. I am expecting some guidance to solve the problem.

Tensorboard error: Failed to launch TensorBoard (exited with 1). Contents of stderr:

Can someone help me with this error. I tried uninstalling Tensorflow Tensorboard and reinstalled still I am facing the issue.
ERROR: Failed to launch TensorBoard (exited with 1).
Contents of stderr:
2021-05-29 16:11:25.794509: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
Traceback (most recent call last):
File "c:\users\shara\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\shara\anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\shara\anaconda3\Scripts\tensorboard.exe\__main__.py", line 7, in <module>
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\main.py", line 46, in run_main
app.run(tensorboard.main, flags_parser=tensorboard.configure)
File "c:\users\shara\anaconda3\lib\site-packages\absl\app.py", line 300, in run
_run_main(main, args)
File "c:\users\shara\anaconda3\lib\site-packages\absl\app.py", line 251, in _run_main
sys.exit(main(argv))
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\program.py", line 276, in main
return runner(self.flags) or 0
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\program.py", line 292, in _run_serve_subcommand
server = self._make_server()
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\program.py", line 472, in _make_server
deprecated_multiplexer,
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\backend\application.py", line 145, in TensorBoardWSGIApp
experimental_middlewares,
File "c:\users\shara\anaconda3\lib\site-packages\tensorboard\backend\application.py", line 253, in __init__
"Duplicate plugins for name %s" % plugin.plugin_name
ValueError: Duplicate plugins for name projector
It may be possible that you still have 2 versions of tensorboard installed.
Here is a script, which will check if there are some problems with your tensorboard and may give you some instructions on how to fix it:
https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py
I would give it a try.

pyttsx3 not working on python 3.7 no module found

I am receiving the following error with the following code
import speech_recognition as sr
import pyttsx3
engine = pyttsx3.init()
engine.runAndWait
engine.say("Hello")
Traceback (most recent call last):
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\__init__.py",
line 20, in init
eng = _activeEngines[driverName]
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\weakref.py",
line 137, in \_\_getitem\_\_
o = self.data[key]()
KeyError: None
During the handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ProBook\Desktop\app1\APP.py", line 3, in <module>
engine = pyttsx3.init()
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\__init__.py",
line 22, in init
eng = Engine(driverName, debug)
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\engine.py",
line 30, in __init__
self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\driver.py",
line 50, in __init__
self._module = importlib.import_module(name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\importlib\__init__.py",
line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pyttsx3\drivers\sapi5.py",
line 3, in <module>
import win32com.client
File "C:\Users\ProBook\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\win32com\__init__.py",
line 5, in <module>
import win32api, sys, os
ImportError: DLL load failed: The specified module could not be found.
Does anyone have a solution for this? I already tried installing and re-installing the packages as well as python several times
It looks like the default sapi5 engine is missing.
Try to explicitly specify the language engine.
pyttsx3.init("sapi5")
If the problem persists, try installing espeak and initializing the pyttsx with it.
More info there
Try the command python -m pip install --upgrade pip i had the same problem ..this will upgrade your pip packages ..it worked for me though
if pyttsx3 module not installed in your operating system just write these command on Anaconda Prompt or Python command
pip install pyttsx3==2.71 OR pip install -U pyttsx3==2.71

Upgrading to Tensorflow 1.3 Error: DLL load failed: The specified module could not be found

I have installed tensorflow 1.3.0 as seen below and I have included cudnn64_6.dll in my %PATH%, along with installed CUDA 8.0, but I still get an error message when importing tensorflow. The error message is after the installation message below:
(tensorflow) C:\Users\alexz>pip install --ignore-installed --upgrade tensorflow-gpu
Collecting tensorflow-gpu
Using cached tensorflow_gpu-1.3.0-cp36-cp36m-win_amd64.whl
Collecting protobuf>=3.3.0 (from tensorflow-gpu)
Using cached protobuf-3.4.0-py2.py3-none-any.whl
Collecting wheel>=0.26 (from tensorflow-gpu)
Using cached wheel-0.29.0-py2.py3-none-any.whl
Collecting tensorflow-tensorboard<0.2.0,>=0.1.0 (from tensorflow-gpu)
Using cached tensorflow_tensorboard-0.1.5-py3-none-any.whl
Collecting numpy>=1.11.0 (from tensorflow-gpu)
Using cached numpy-1.13.1-cp36-none-win_amd64.whl
Collecting six>=1.10.0 (from tensorflow-gpu)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting setuptools (from protobuf>=3.3.0->tensorflow-gpu)
Using cached setuptools-36.2.7-py2.py3-none-any.whl
Collecting werkzeug>=0.11.10 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow-gpu)
Using cached Werkzeug-0.12.2-py2.py3-none-any.whl
Collecting html5lib==0.9999999 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow-gpu)
Collecting markdown>=2.6.8 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow-gpu)
Collecting bleach==1.5.0 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow-gpu)
Using cached bleach-1.5.0-py2.py3-none-any.whl
Installing collected packages: six, setuptools, protobuf, wheel, werkzeug, html5lib, markdown, bleach, numpy, tensorflow-tensorboard, tensorflow-gpu
Successfully installed bleach-1.5.0 html5lib-0.9999999 markdown-2.6.9 numpy-1.13.1 protobuf-3.4.0 setuptools-36.2.7 six-1.10.0 tensorflow-gpu-1.3.0 tensorflow-tensorboard-0.1.5 werkzeug-0.12.2 wheel-0.29.0
Additionally, I have python 3.6 with anaconda and followed instruction on tensorflow's website to install everything.
Error Message:
Python 3.6.1 |Anaconda custom (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\My_Items\Anaconda\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 648, in _load_unlocked
File "<frozen importlib._bootstrap>", line 560, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\My_Items\Anaconda\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\My_Items\Anaconda\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 648, in _load_unlocked
File "<frozen importlib._bootstrap>", line 560, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\My_Items\Anaconda\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
I got the same issue while installing Tensorflow 1.3 a month ago.
I fixed it by installing CudNN 5.1 instead of 6.
NB : I just saw that latest version is 7 now, maybe it works (I haven't tried).
I hope it helps,

TensorFlow on Windows: ImportError: No module named '_pywrap_tensorflow_internal'

I am trying to make TensorFlow work on Windows. But after installation of Python 3.5 and TensorFlow, I keep getting the following error when I import the TensorFlow module:
>>>import tensorflow
Traceback (most recent call last):
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\site-packages\
tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\importlib\__in
it__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 906, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: %1 is not a valid Win32 application.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\site-packages\
tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\site-packages\
tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\site-packages\
tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\importlib\__in
it__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\site-packages\
tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\site-packages\
tensorflow\python\__init__.py", line 51, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\site-packages\
tensorflow\python\pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\site-packages\
tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
"return importlib.import_module(mname)"
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\importlib\__in
it__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 906, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: %1 is not a valid Win32 application.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\site-packages\
tensorflow\python\pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\site-packages\
tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\site-packages\
tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow_internal')
File "C:\Users\amit\AppData\Local\Programs\Python\Python35\lib\importlib\__in
it__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
Please suggest what is missing from my end so that above runtime error can be removed.
This error arises when one of the libraries (DLLs) on which TensorFlow depends cannot be found. To diagnose this kind of error, I have written a script that you can download from here; running the script will print suggestions about what steps to take to fix the error.
If you are running the CPU-only version of TensorFlow, the most likely DLL to be missing is MSVCP140.DLL. It is part of the Microsoft Visual C++ Redistributable Update 3, which you can download from here.
If you are running the GPU version of TensorFlow, it is possible that the CUDA libraries or the cuDNN libraries cannot be found. TensorFlow on Windows supports CUDA 8.0 (download from here) and cuDNN 5.1 (download from here). Note that cuDNN is often installed to a different directory from CUDA, and you may need to manually add it to your %PATH% environment variable.
just run below command it will clear all dependencies and then update it or remove and install the latest version of tensor flow(For CPU)
This worked for me
pip install tensorflow==1.5
Thanks, your tool was awesome. Turns out my CUDA 8.0 install had a slightly older version of cudnn64_5.dll instead of cudnn64_6.dll.