1

I have faild to run a tool using for satellite data process CCPLOT

After successfully installed, I tried the first case.

Here is the error information.

>Traceback (most recent call last):
          File "/Users/HYF/anaconda/bin/ccplot", line 56, in <module>      
>from ccplot.hdf import HDF    
>ImportError: dlopen(/Users/HYF/anaconda/lib/python2.7/site-packages/ccplot/hdf.so, 2): Library not loaded: libjpeg.8.dylib      
>Referenced from: /Users/HYF/anaconda/lib/python2.7/site-packages/ccplot/hdf.so

I have look through this answer here

I have tried sudo ln -s /usr/local/Cellar/jpeg/8d/lib/libjpeg.8.dylib /usr/local/lib/libjpeg.8.dylib.

And now the libjpeg.8.dylib are stay in the folder /usr/local/lib/

But the error doesn't disappear. How to fix this bug?

I'm using Mac OS X system with Anaconda installed. Any advice would be appreciate!

PS

Thanks for the advice.

with DYLD_INSERT_LIBRARIES=/usr/local/lib/libjpeg.8.dylib python

The error is the same ImportError: dlopen(/Users/HYF/anaconda/lib/python2.7/site-packages/ccplot/hdf.so, 2): Library not loaded: libjpeg.8.dylib Referenced from: /Users/HYF/anaconda/lib/python2.7/site-packages/ccplot/hdf.so Reason: image not found

With DYLD_LIBRARY_PATH=/usr/local/lib python.

from ccplot.hdf import HDF shows no errors.

But when I import matplotlib, there is another error shows

ImportError: dlopen(/Users/HYF/anaconda/lib/python2.7/site-packages/matplotlib/_path.so, 2): Symbol not found: ___emutls_get_address Referenced from: /usr/local/lib/libstdc++.6.dylib Expected in: /usr/local/lib/libgcc_s.1.dylib in /usr/local/lib/libstdc++.6.dylib

Community
  • 1
  • 1
Han Zhengzu
  • 3,694
  • 7
  • 44
  • 94
  • 1
    Try `DYLD_LIBRARY_PATH=/usr/local/lib python` just in case `/usr/local/lib` is not on your path. Try `otool -L /usr/local/lib/libjpeg.8.dylib` to make sure its dependencies are satisfied. Try `DYLD_INSERT_LIBRARIES=/usr/local/lib/libjpeg.8.dylib python` so that the jpeg library is preloaded. These aren't good long term solutions, but they may help diagnose the problem. – Neapolitan Dec 03 '16 at 05:38
  • Thanks for your reply. Using otool tool, this is the output: `/usr/local/lib/libjpeg.8.dylib: /usr/local/lib/libjpeg.8.dylib (compatibility version 13.0.0, current version 13.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)` – Han Zhengzu Dec 03 '16 at 07:32
  • Is the version 1213.00 un-suitable for the system? – Han Zhengzu Dec 03 '16 at 07:33
  • Anaconda has matplotlib available: use `conda install matplotlib` to install. You should be using [environments](http://conda.pydata.org/docs/using/envs.html) so it is easier to clean up if you make a mistake installing something. – Neapolitan Dec 03 '16 at 16:28
  • Looking at your matplotlib import error, it is picking up `/usr/local/lib/libstdc++.6.dylib`. If you had install matplotlib via anaconda, it is probably linked against `/usr/lib/libstdc++.6.dylib` (`otool -L` will tell you), and the DYLD_LIBRARY_PATH is causing it to load the wrong directory. Maybe `DYLD_FALLBACK_LIBRARY_PATH`? See `man dyld` for details. – Neapolitan Dec 03 '16 at 16:42

0 Answers0