2
votes

Since my CPU doesn't support AVX instructions and I want to install a newer version of Tensorflow (>= 2.0), I installed a tensorflow wheel for my Python version from https://github.com/fo40225/tensorflow-windows-wheel using pip

However, when trying to import tensorflow, I get the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py", line 98, in <module>
    from tensorflow_core import *
  File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\__init__.py", line 45, in <module>
    from . _api.v2 import compat
  File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\_api\v2\compat\__init__.py", line 23, in <module>
    from . import v1
  File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\_api\v2\compat\v1\__init__.py", line 664, in <module>
    from tensorflow_estimator.python.estimator.api._v1 import estimator
  File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_estimator\__init__.py", line 10, in <module>
    from tensorflow_estimator._api.v1 import estimator
  File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_estimator\_api\v1\estimator\__init__.py", line 10, in <module>
    from tensorflow_estimator._api.v1.estimator import experimental
  File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_estimator\_api\v1\estimator\experimental\__init__.py", line 10, in <module>
    from tensorflow_estimator.python.estimator.canned.dnn import dnn_logit_fn_builder
  File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_estimator\python\estimator\canned\dnn.py", line 33, in <module>
    from tensorflow_estimator.python.estimator import estimator
  File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 53, in <module>
    from tensorflow_estimator.python.estimator import util as estimator_util
  File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_estimator\python\estimator\util.py", line 75, in <module>
    class _DatasetInitializerHook(tf.compat.v1.train.SessionRunHook):
AttributeError: module 'tensorflow' has no attribute 'compat'

I have searched, but not found anybody who encountered the same issue using tensorflow wheel (just trying to install tensorflow via "pip install tensorflow" isn't going to work for me, as I will run into the ImportError: DLL load failed-error).

Hope someone can help.

Thanks, but I've already been there and it didn't help me. - r_ve
I don't see where I asked two questions? - r_ve
The DLL load failed-error stems from the fact that my CPU doesn't support AVX (as stated at the top of my question; also explained in the link I posted). This was not intended to be the question, hence why it's just a comment in brackets. - r_ve