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!!!
I borrowed the RPI 3B from a friend's friend. hence I don't know the
hostname so that I can ping the RPI to know its IP address.
Raspberry Pi is a board without any internal storage hence it doesn't matter where you got this. You installed your own operating system (a downloaded image file) on the SD-Card and because of that, you have formated (remove any ...
Because you have already flashed the SD Card with Raspbian Stretch all the installation of your friends friend is lost. So you have to start again from scratch. Just download Raspbian Buster and install it as described at Installing operating system images. Then enable ssh as shown in SSH (Secure Shell). With this image you definitely have user pi with ...
That what @Milliways wrote in his answer. To answer your question about testing for bad blocks on the SD Card: you cannot test it, simply while a SD Card does not have blocks. It has cells with limited live time for writing it. SD Cards today have spare cells that will be used on the fly for defected cells and a logic will always show you a proper SD Card ...
After two days, and a lot of work troubleshooting, I've fixed the problem by:
a) Inserting my problematic disk into another computer
b) Unmounting the directory (it was automatically mounted) by umount /dev/sda1
c) Running sudo fsck /dev/sda1
It turned out to be a bad bit, and now the problem is all fixed. For future reference, the problem wasn't LXDE, ...
If you haven't destroyed the image with all your attempts with different tools you are able to mount it like an SD Card and get access to its files. For example I will take the Raspbian Buster Lite image how this can be done. Create a mount point:
linux ~$ sudo mkdir /mnt/img
Mount partitions from the image
Attach the image partitions to ...
1) Open Terminal
Click on the Terminal Window.
2) cd /usr/bin
sets target directory (actually changes directory.) for cp (copy) command.
3) sudo cp lxterminal xterm
It makes another copy of "lxterminal" and re-names it to "xterm" (old terminal) so you can use both lxterminal and xterm command to start terminal.
Problem Solved Enjoy.