Issue
I have just built Tensorflow r1.12 from source in Ubuntu 16.04. The installation is successful.
When I run a certain script in Spyder at the 1st time, everything flows smoothly. However, when I continue to run another script, following errors occur (which didn't happen previously):
File "/home/haohua/tf_env/lib/python3.6/site-packages/tensorflow/init.py", line 24, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/home/haohua/tf_env/lib/python3.6/site-packages/tensorflow/python/init.py", line 70, in from tensorflow.python.framework.framework_lib import * # pylint: disable=redefined-builtin
File "/home/haohua/tf_env/lib/python3.6/site-packages/tensorflow/python/framework/framework_lib.py", line 30, in from tensorflow.python.framework.sparse_tensor import SparseTensor
File "/home/haohua/tf_env/lib/python3.6/site-packages/tensorflow/python/framework/sparse_tensor.py", line 248, in pywrap_tensorflow.RegisterType("SparseTensorValue", SparseTensorValue)
TypeError: Type already registered for SparseTensorValue
The temporary solution to avoid such TypeError is to restart the kernel.
But I don't want to restart kernel at every single step of running a script. Thus, I would like to ask for a critical solution for such kind of issue. Thank you in advance.
Solution
(Spyder maintainer here) This error was fixed in Spyder 3.3.3, released on February/2019.
Answered By - Carlos Cordoba
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.