I am trying to use tensorflow for a research project, but I am unable to import it into my program even though I successfully installed it using Anaconda. I am using a Mac 10.13.5. Whenever I try to import tensorflow, I keep receiving this error: AttributeError: 'module' object has no attribute 'integer' in the tensorflow file compat.py. The error is at line 129 of this file:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/util/compat.py
at the line: "integral_types = (_numbers.Integral, _np.integer)"
Can anyone help me resolve this so that I can use tensorflow? Thank you.
I did encountered that problem also. I tried re-installing numpy with pip install -U --force-reinstall numpy and things worked. Hope it works for you too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With