[Tutor] Not able to import Tensorflow in python script

Peter Otten __peter__ at web.de
Wed Oct 25 16:55:57 EDT 2017

shubham goyal wrote:

> Hello all,
> I was trying to run this check script of tensorflow after installing the
> tensorflow successfully. but it is not able to import tensorflow properly
> i think. but sometimes in python
> shell it gets imported. it is giving the error "can't import name
> template"

>     import logging
>   File "/usr/lib/python3.5/logging/__init__.py", line 28, in <module>
>     from string import Template
> ImportError: cannot import name 'Template'

Did you write a module called string.py yourself? 

If so, your module may be imported instead of the one in the standard 
library. Rename your module to mystring, say, and the error should go away.

More information about the Tutor mailing list