Reputation: 11
I'm using tensorflow cpu via anaconda and after using the command
conda install tensorflow-gpu
I got the following error message
File "", line 1, in runfile('C:/Users/g/Desktop/Masters-Project/Gaussian ROC example/Neural Network Worked Example.py', wdir='C:/Users/g/Desktop/Masters-Project/Gaussian ROC example')
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile execfile(filename, namespace)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/g/Desktop/Masters-Project/Gaussian ROC example/Neural Network Worked Example.py", line 7, in from keras.models import Sequential as sequential
File "C:\ProgramData\Anaconda3\lib\site-packages\keras__init__.py", line 3, in from . import utils
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\utils__init__.py", line 6, in from . import conv_utils
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\utils\conv_utils.py", line 9, in from .. import backend as K
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\backend__init__.py", line 89, in from .tensorflow_backend import *
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in import tensorflow as tf
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow__init__.py", line 22, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python__init__.py", line 49, in from tensorflow.python import pywrap_tensorflow
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in raise ImportError(msg)
ImportError: Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\ProgramData\Anaconda3\lib\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "C:\ProgramData\Anaconda3\lib\imp.py", line 343, in load_dynamic return _load(spec) ImportError: DLL load failed: The specified module could not be found.
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'm not even trying to use the GPU at the minute since it hasn't arrived yet and this is CPU only mode, I'm very confused as to what could be wrong.
Upvotes: 1
Views: 563
Reputation: 7543
tensorflow-gpu
is not just an additional module for tensorflow but rather a separate version of tensorflow
. When you installed tensorflow-gpu
the tensorflow
package got uninstalled. Now loading the tensorflow-gpu version fails, since you probably are missing all of the CUDA libraries. Just remove the tensorflow-gpu
package and reinstall the old tensorflow
package again until you actually have a CUDA enabled GPU.
Upvotes: 1