I have created a python virtual environment using virtualenv, after activating it, I can see where is Python installed in my shell as following:
For me, libpython3.6m.so.1.0 was in the folder where I downloaded Python source (~/Python3.6.9).
libpython3.6m.so.1.0
~/Python3.6.9
I simply did : sudo cp ~/Python3.6.9/libpython3.6m.so.1.0 /usr/local/lib/python3.6/
sudo cp ~/Python3.6.9/libpython3.6m.so.1.0 /usr/local/lib/python3.6/
and : export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/python3.6
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/python3.6