Description
When I try to import tensorflow in python I get this issue:
Note: It was working fine yesterday. It is really strange that today it no longer works.
Also note: This is my first time to ever post a question online, as I prefer to find answers to my own problems. The issue here is that there is no documentation on this problem online and I am hitting a wall on ideas for once for how to resolve it. I am using TF without gpu support, but am hopeful the capable team on this git can at least tell me if the problem on my end or not. I realize it is likely something on my end, but a response to verify that would be helpful, even if the problem is perceived as too simple to bother with.
import tensorflow as tf
Traceback (most recent call last):
File "/home/student/miniconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/student/miniconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/student/miniconda3/lib/python3.5/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 "/home/student/miniconda3/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/student/miniconda3/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /home/student/miniconda3/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: cuDevicePrimaryCtxRetain
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/home/student/miniconda3/lib/python3.5/site-packages/tensorflow/init.py", line 24, in
from tensorflow.python import *
File "/home/student/miniconda3/lib/python3.5/site-packages/tensorflow/python/init.py", line 51, in
from tensorflow.python import pywrap_tensorflow
File "/home/student/miniconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/student/miniconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/student/miniconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/student/miniconda3/lib/python3.5/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 "/home/student/miniconda3/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/student/miniconda3/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /home/student/miniconda3/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: cuDevicePrimaryCtxRetain
Activity
[-]Issue with tensor flow[/-][+]Issue with tensor flow (undefined symbol: cuDevicePrimaryCtxRetain)[/+]skye commentedon May 15, 2017
Please provide details about what platform you are using (operating system, architecture). Also include your TensorFlow version. Also, did you compile from source or install a binary? If you are unclear what to include see the issue template displayed in the Github new issue template.
We ask for this in the issue submission template, because it is really difficult to help without that information. Thanks!
Lee-L-Boyd commentedon May 16, 2017
Thank you for the response. It appears to be an issue with Cuda and driver compatibility on an older laptop. Closing ticket.
dahangli commentedon May 19, 2017
How to solve it. I have get the same problem.
Lee-L-Boyd commentedon May 19, 2017
dahangli commentedon May 19, 2017
I try nvidia 710 with Ubuntu 14.04,s ok!
I try nvidia 1060 with Ubuntu 14.04, Fault! -- undefined symbol: cuDevicePrimaryCtxRetain!
NVIDIA-Linux-x86_64-375.66.run
cuda_8.0.61_375.26_linux.run
CuDNN5.1
Anaconda3-4.3.1-Linux-x86_64.sh (Python3.6)
TensorflowGPU1.1.0
Lee-L-Boyd commentedon May 19, 2017
Lee-L-Boyd commentedon May 19, 2017