2

I'm following this guide to create an AI chatbot which requires Python 3.6, TensorFlow etc. So I installed Python 3.6.8.

To install TensorFlow I tried sudo pip install tensorflow

I also downloaded the .whl file and tried sudo pip install tensorflow-1.14.0-cp36-none-linux_armv7l.whl

I also tried using pip3.6 sudo pip3.6 install tensorflow-1.14.0-cp36-none-linux_armv7l.whl

All of them return the same error.

 Loading library to get version: libhdf5.so
 error: libhdf5.so: cannot open shared object file: No such file or directory
 ----------------------------------------
Command "/usr/local/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/ tmp/pip-install-v9ml238y/h5py/setup.py';f=getattr(tokenize, 'open', open)(__file __);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, ' exec'))" install --record /tmp/pip-record-m8i6i3k3/install-record.txt --single-v ersion-externally-managed --compile" failed with error code 1 in /tmp/pip-instal l-v9ml238y/h5py/

Sorry for any mistakes. This is my first post.

asked Jan 4, 2020 at 19:07
7
  • 1
    Try to install the library : sudo apt-get install hdf5 libhdf5-dev ? Commented Jan 4, 2020 at 21:12
  • I think you mean sudo apt-get install libhdf5-dev Commented Jan 5, 2020 at 7:14
  • 1
    yes but libhdf5-dev contain dev headers files. The library (.so) itself must be in a package libhdf5-X where X is the version. You can find the lib with : sudo apt-cache search libhd5 for example you can have libhdf5-100. Commented Jan 5, 2020 at 7:44
  • 1
    packages.debian.org/stretch/libhdf5-100 : HDF5 is a file format and library for storing scientific data Commented Jan 5, 2020 at 7:48
  • 1
    Hi AnonyoZarif, Welcome and nice to meet you. Ah, let me see. A couple of months ago I tried to install TF but failed because of the "failed to build h5py error" error. I am not sure if it is related to "hd5" thing mentioned by @Ephemeral. In the same Q&A, #Kor mentioned that he finally solved the problem, but I still got stuck. Anyway, I have stalled my project and waiting for google to update. Here are the links for your reference, in case you are interested. Good luck and cheers. (1) Rpi4B TensorFlow Installation Record - tlfong01 2019sep30 penzu.com/public/3970e2d0 Commented Jan 5, 2020 at 14:42

1 Answer 1

6

Okay, I have solved my problem. I reinstalled Python 3.6.

Then I used this command sudo apt-get install libhdf5-dev and then sudo pip install tensorflow and installed TensorFlow successfully!

I think the problem was with my Python installation.

Thanks to all of you for your kindness. Cheers!!!

answered Jan 5, 2020 at 16:39
4
  • Yes, I did complain that GG TF installation was once wrong and misleading. They said your could not use PIP2 for Python 3, and if you did you will get a mess. But they did not said so before hand. Commented Jan 6, 2020 at 12:12
  • Yes you are right but i used pip3.6 Commented Jan 6, 2020 at 14:58
  • A long time ago (I can't remember when) I also tried to install TF with pip2 and as usual- it failed. Commented Jan 6, 2020 at 15:01
  • 1
    Okay @Ingo doing it Commented Jan 12, 2020 at 10:28

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.