importerror: libpng16.so.16: cannot open shared object file: no such file or directory

  • Last Update :
  • Techknowledgy :

Use the following:

sudo apt - get install libpng16 - 16

Suggestion : 2

I am trying to install matplotlib version 2.0.0. I don't have root access, hence can't use sudo/apt-get When I tried installing matplotlib, it showed dependencies on freetype and libpng. So, I executed the following steps:,Programs installed in a user's home directory may also install some necessary libraries. The way to tell the program loader where these libraries are is through the environment variable LD_LIBRARY_PATH.,Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.,Which worked perfectly fine. But when I do import matplotlib.pyplot as plt it throws the following error:

Programs installed in a user's home directory may also install some necessary libraries. The way to tell the program loader where these libraries are is through the environment variable LD_LIBRARY_PATH.

export LD_LIBRARY_PATH="/$HOME/<any other optional program directories>/lib"

Suggestion : 3

copy libpng16.so.16 to /usr/lib/ may be anycodings_matplotlib ok. in my computer(Fedora 19), anycodings_matplotlib libpng16.so.16 can be found in anycodings_matplotlib /usr/local/lib,I have meet the same problem with you. anycodings_matplotlib Maybe you can try copy libpng16.so.16 to anycodings_matplotlib /usr/lib64/. It works for me,I have found the file "libpng16.so.16" and anycodings_python copied it to /usr/lib. But nothing anycodings_python happened. Any help will be appreciated.,After installing matplotlib successfully on anycodings_python my Fedora19,I tested my code written by anycodings_python python. Unfortunately,I got this anycodings_python ImportError .

After installing matplotlib successfully on anycodings_python my Fedora19,I tested my code written by anycodings_python python. Unfortunately,I got this anycodings_python ImportError .

$ python ren.py

Traceback (most recent call last):

File "ren.py", line 10, in <module>
   import matplotlib.pyplot as plt

   File "/usr/lib64/python2.7/site-packages/matplotlib/pyplot.py", line 26, in <module>
      from matplotlib.figure import Figure, figaspect

      File "/usr/lib64/python2.7/site-packages/matplotlib/figure.py", line 32, in <module>
         from matplotlib.image import FigureImage

         File "/usr/lib64/python2.7/site-packages/matplotlib/image.py", line 22, in <module>
            import matplotlib._png as _png

            ImportError: libpng16.so.16: cannot open shared object file: No such file or directory

Use the following:

sudo apt - get install libpng16 - 16

Suggestion : 4

Carla单机模式配置时候出错:ImportError: libpng16.so.16: cannot open shard object file: No such file or directory,ImportError: libpng12.so.0: cannot open shared object file: No such file or directory,ImportError: libSM.so.6: cannot open shared object file: No such file or directory,ImportError: libatlas.so.3: cannot open shared object file: No such file or directory

如下代码解决:

sudo apt - get install libpng16 - 16