TensorFlow ImportError: No module named backports

时间:2017-06-19 13:55:48

标签: python tensorflow

I remove the tesorflow 0.12rc and install the 1.20.

When I run the process, I got an ImportError

ImportError: No module named backports

I add backports.weakref package in PyCharm, but I still got above error message.

How to fix this error?

1 个答案:

答案 0 :(得分:0)

如果您正在使用,backports模块实际上并不需要/需要 Python 3.4+。有一个拉取请求来解决这个问题: https://github.com/tensorflow/tensorflow/pull/11174

但就目前而言,解决方法是只注释系统import backports中的tf_should_use.py行。