python3: error while loading shared libraries: libpython3.4m.so.1.0:
cannot open shared object file: No such file or directory

Solution:

LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/python
sudo nano /etc/ld.so.conf
# add a line
/usr/local/lib (or include /usr/local/lib)
/usr/local/lib64 (or include /usr/local/lib64)

[OPTIONAL]:

 ln -s /usr/lib/libpython3.1.so.1.0 /usr/lib64/libpython3.1.so.1.0

 

OR THIS WAY:

goto your folder where you untar/unzip python 3.4.3

./configure --enable-shared \
 --with-system-ffi \
 --with-system-expat \
 --enable-unicode=ucs4 \
 --prefix=/apps/python-${PYTHON_VERSION} \
 LDFLAGS="-L/apps/python-${PYTHON_VERSION}/extlib/lib -Wl,--rpath=/apps/python-${PYTHON_VERSION}/lib -Wl,--rpath=/apps/python-${PYTHON_VERSION}/extlib/lib" \
 CPPFLAGS="-I/apps/python-${PYTHON_VERSION}/extlib/include"

Then:

make
sudo make install