Reputation: 675
I am trying to run the following python script in Pycharm:
import tensorflow as tf
hello = tf.constant("hello TensorFlow!")
sess=tf.Session()
print(sess.run(hello))
but I get an error with the final statement being:
AttributeError: type object 'h5py.h5r.Reference' has no attribute '__reduce_cython__'
However the same script executes ok with iPython, thus I suspect the problem is in Pycharm.
I set the correct interpreter in Pycharm which points to the conda env, moreover I found similar problem and set manually LD_LIBRARY_PATH
to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64
.
This did not do the job either.
Does anybody know what else am I supposed to do?
I am using:
Upvotes: 0
Views: 152
Reputation: 675
Downgrading the h5py from 2.9.0
which came preinstalled with tensorflow to 2.8.0
solves the problem.
I don't know if it is the best solution, but for now it solves the problem.
Upvotes: 1