<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<pre wrap="">On 03/26/2013 11:16 PM, Andrew Packer wrote:
</pre>
<blockquote type="cite" style="color: #000000;">
<pre wrap="">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
</pre>
</blockquote>
<pre wrap="">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
<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>usr/local/bin/openslide* /usr/local/lib<span class="moz-txt-tag">/</span></i><b class="moz-txt-star"><span class="moz-txt-tag">*</span>openslide<span class="moz-txt-tag">*</span></b>
/usr/local/share/man/man1/<b class="moz-txt-star"><span class="moz-txt-tag">*</span>openslide<span class="moz-txt-tag">*</span></b>" and try again.
</pre>
<blockquote type="cite" style="color: #000000;">
<pre wrap="">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
</pre>
</blockquote>
<pre wrap="">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
</pre>
</body>
</html>