'How to fix error while loading shared libraries: "libpython3.6m.so.1.0: cannot open shared object file: No such file or directory"?

I have an error after upgrade Fedora 30 version. I try to run my Django project, but I got an error like

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

How can I fix it?



Solution 1:[1]

Copy the library file libpython3.6m.so.1.0 to your /usr/lib/. If you have downloaded Python3.6.x and installed it manually you will find the file libpython3.6m.so.1.0 in the folder where you've extracted Python3.6.x or in /usr/local/lib/. That worked for me under Debian 8.

Solution 2:[2]

For Python 3.6, I was able to fix this by simply installing the lib, as:

sudo apt-get install libpython3.6-dev

Solution 3:[3]

I was able to fix it by installing libpython3.6:

sudo apt-get install libpython3.6

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 i.mohamed
Solution 2 S3DEV
Solution 3