3

I successfully created my tensorflow environment with Anaconda3 on my machine with the steps introduced on this link. But when I try to try to do :

>>> import tensorflow as tf

I get the following error messages : OSError and ImportError.

Traceback (most recent call last):
  File "C:\Users\Froilan\Anaconda3\envs\tensorflow\lib\site-
packages\tensorflow\python\platform\self_check.py", line 75, in preload_check
ctypes.WinDLL(build_info.cudart_dll_name)
  File "C:\Users\Froilan\Anaconda3\envs\tensorflow\lib\ctypes\__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] This specified module could not be found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Froilan\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
  File "C:\Users\Froilan\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
  File "C:\Users\Froilan\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in <module>
self_check.preload_check()
  File "C:\Users\Froilan\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\platform\self_check.py", line 82, in preload_check
% (build_info.cudart_dll_name, build_info.cuda_version_number))
ImportError: Could not find 'cudart64_80.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 8.0 from this URL: https://developer.nvidia.com/cuda-toolkit

Could it be something to do with my cpu? I use Ryzen 1700. + GPU : GTX 1050 Ti - A bit inferior to 1080 ti or so.. but I've heard that GPU's would still be way better than CPU's.

4
  • Do you want to use CPU or GPU? Commented Jan 2, 2018 at 12:14
  • Could please also indicate which GPU are you using. Commented Jan 2, 2018 at 12:15
  • I want to use the GPU version -- mine is GTX 1050 ti Commented Jan 2, 2018 at 12:33
  • good, check my answer, apparently, you did not install or set the CUDA lib. Commented Jan 2, 2018 at 12:34

1 Answer 1

3

you need to install CUDA library first, I would recommend to follow this link:

https://gist.github.com/mjdietzx/0ff77af5ae60622ce6ed8c4d9b419f45

UPDATE: for the Windows OS, please follow this approach:

http://blog.nitishmutha.com/tensorflow/2017/01/22/TensorFlow-with-gpu-for-windows.html

Sign up to request clarification or add additional context in comments.

4 Comments

Erp.. I think that's for Linux..? I'm on Windows 10. Or is there a way to implement that? Sorry I'm new to OS, bash and stuffs.. :(
Okay, thank you so much. But one more question which is somewhat irrelevant.. During the CUDA 8.0 installation process, my machine failed to recognize my second monitor. Is this normal?
I'm afraid google's not helping me this time.. Anyways, I'll try to find out what's wrong. Thanks a ton
OK, solved it. FOR THOSE WHO MIGHT BE SUFFERING FROM SIMILAR PROBLEMS: check your GPU driver. Update it, reboot your machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.