slidedeck.py gives image-not-found or no-module-named-flask error (Benjamin Gilbert)

Andrew Packer andrew at cogitant.co.nz
Sat Mar 30 21:55:40 EDT 2013


On 03/26/2013 11:16 PM, Andrew Packer wrote:

> OSError: dlopen(libopenslide.0.dylib, 6): Library not loaded:
> /opt/local/lib/libpng14.14.dylib
>     Referenced from: /usr/local/lib/libopenslide.0.dylib
>     Reason: image not found

It looks as though you previously installed OpenSlide from source and
haven't removed it.  The old version is being loaded and is failing to
find an old version of libpng that used to be shipped by MacPorts.
Remove the hand-installed OpenSlide with "sudo rm -f
/usr/local/bin/openslide* /usr/local/lib/*openslide*  
/usr/local/share/man/man1/*openslide*" and try again.

> On the other hand when I try using the MacPorts Python Launcher to
> launch slidedeck.py, I get the following.
>
> ImportError: No module named flask

Your system has two installations of Python: the one that comes with Mac
OS X and the one installed by MacPorts.  Flask is installed under
/opt/local, which is the MacPorts copy, so that's the Python you want.
Apparently the Python Launcher is giving you the other one.

--Benjamin Gilbert

Dealing with the second point first, I've set the Python launcher to use /opt/local/bin/pythonw as the interpreter.  I now get consistent results whether I use the Python launcher or just type python slidedeck.py in a terminal window.

Dealing with the first point above, I've removed the openslide files from the /usr/local directories (including a few that were in usr/local/include/).  But I still get a similar error to the previous, viz:

$ python /Users/amp/Downloads/bgilbert-slidedeck-95d298c/slidedeck.py
Traceback (most recent call last):
   File "/Users/amp/Downloads/bgilbert-slidedeck-95d298c/slidedeck.py", line 24, in <module>
     from openslide import OpenSlide, OpenSlideError
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openslide/__init__.py", line 32, in <module>
     from openslide import lowlevel
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openslide/lowlevel.py", line 41, in <module>
     _lib = cdll.LoadLibrary('libopenslide.0.dylib')
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
     return self._dlltype(name)
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__
     self._handle = _dlopen(self._name, mode)
OSError: dlopen(libopenslide.0.dylib, 6): image not found
mac-air:~ amp$


But libopenslide.0.dylib is present and is located in /opt/local/lib/

Have I still got a pathway problem?

===Andrew Packer





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20130331/987db2dc/attachment.html 


More information about the openslide-users mailing list