Python3.7: error while loading shared libraries: libpython3.7m.so.1.0

I'm using homebrew/linuxbrew to manage my latest python3 version. Doing this export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.8.3/lib works for me (no reboot need).


You need to add /usr/local/lib/ to the library search path. You can call the following in the current shell before running python3.7:

export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib

Or run ldconfig to add the path to the linker cache:

sudo ldconfig /usr/local/lib 

I just installed the required library using:

sudo apt-get install libpython3.7