Mikko Ohtamaa wrote:
>
>
> rbrewer wrote:
>>
>> I recently upgraded our Plone 3.0.5 site to Plone 4.0.2, running on Mac
>> OS X Server 10.6 (using the Mac OS X binary installer, not the Unified
>> installer), and I am running into a problem.
>>
>
> This is not always necessary related to Plone itself, but might be a mess
> with OSX system Python installation.
>
> Try this
>
> 1) Check what Python interpreter is used by opening bin/instance or
> similar file and read its first line (like #!/usr/bin/python2.6)
>
bin/instance is using the Python installed by the Mac OS X installer
"#!/Applications/Plone/Python-2.6/bin/python".
> 2) Start this Python interpreter in verbose mode python -v
>
> 3) Type in command import _imaging
>
> 4) Import tracing dump should be printed in to the terminal
>
> 5) Inspect the dump and see the actual .so files Python tries to read
>
> 6) If you still cannot figure out what's going on please paste the related
> import traces to this mailing list thread
>
The Mac OS X python is able to load _imaging with no problems:
dasha(3) % /usr/bin/python -v
[much import text removed]
>>> import _imaging
dlopen("/Library/Python/2.6/site-packages/PIL-1.1.7-py2.6-macosx-10.6-universal.egg/_imaging.so",
2);
import _imaging # dynamically loaded from
/Library/Python/2.6/site-packages/PIL-1.1.7-py2.6-macosx-10.6-universal.egg/_imaging.so
However, Plone's python cannot find _imaging:
dasha(32) % /Applications/Plone/Python-2.6/bin/python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /Applications/Plone/Python-2.6/lib/python2.6/site.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/site.py
import site # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/site.pyc
# /Applications/Plone/Python-2.6/lib/python2.6/os.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/os.py
import os # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/os.pyc
import errno # builtin
import posix # builtin
# /Applications/Plone/Python-2.6/lib/python2.6/posixpath.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/posixpath.py
import posixpath # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/posixpath.pyc
# /Applications/Plone/Python-2.6/lib/python2.6/stat.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/stat.py
import stat # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/stat.pyc
# /Applications/Plone/Python-2.6/lib/python2.6/genericpath.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/genericpath.py
import genericpath # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/genericpath.pyc
# /Applications/Plone/Python-2.6/lib/python2.6/warnings.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/warnings.py
import warnings # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/warnings.pyc
# /Applications/Plone/Python-2.6/lib/python2.6/linecache.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/linecache.py
import linecache # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/linecache.pyc
# /Applications/Plone/Python-2.6/lib/python2.6/types.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/types.py
import types # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/types.pyc
# /Applications/Plone/Python-2.6/lib/python2.6/UserDict.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/UserDict.py
import UserDict # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/UserDict.pyc
# /Applications/Plone/Python-2.6/lib/python2.6/_abcoll.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/_abcoll.py
import _abcoll # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/_abcoll.pyc
# /Applications/Plone/Python-2.6/lib/python2.6/abc.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/abc.py
import abc # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/abc.pyc
# /Applications/Plone/Python-2.6/lib/python2.6/copy_reg.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/copy_reg.py
import copy_reg # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/copy_reg.pyc
import encodings # directory
/Applications/Plone/Python-2.6/lib/python2.6/encodings
# /Applications/Plone/Python-2.6/lib/python2.6/encodings/__init__.pyc
matches /Applications/Plone/Python-2.6/lib/python2.6/encodings/__init__.py
import encodings # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/encodings/__init__.pyc
# /Applications/Plone/Python-2.6/lib/python2.6/codecs.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/codecs.py
import codecs # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/codecs.pyc
import _codecs # builtin
# /Applications/Plone/Python-2.6/lib/python2.6/encodings/aliases.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/encodings/aliases.py
import encodings.aliases # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/encodings/aliases.pyc
# /Applications/Plone/Python-2.6/lib/python2.6/encodings/ascii.pyc matches
/Applications/Plone/Python-2.6/lib/python2.6/encodings/ascii.py
import encodings.ascii # precompiled from
/Applications/Plone/Python-2.6/lib/python2.6/encodings/ascii.pyc
Python 2.6.5 (r265:79063, Nov 21 2010, 11:58:21)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/Applications/Plone/Python-2.6/lib/python2.6/lib-dynload/readline.so",
2);
>>> import _imaging
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named _imaging
>>>
However, that might be normal behavior, since I see that bin/instance sets
up many paths, including these:
import sys
sys.path[0:0] = [
'/Applications/Plone/buildout-cache/eggs/Plone-4.0.2-py2.6.egg',
'/Applications/Plone/buildout-cache/eggs/PIL-1.1.6-py2.6-macosx-10.4-x86_64.egg',
[...]
> It might be that e.g. OSX update 32 bit -> 64 bit might have left around
> bad .so files.
>
> If nothing helps then create new Python installation using virtualenv
> utility and install fresh PIL installation there.
>
I don't think Plone, as installed by the Mac installer, uses the system
python installation at all. So something seems to be amiss in the PIL
library that the installer uses, as this is happening right "out of the
box".
--
View this message in context:
http://plone.293351.n2.nabble.com/imaging-so-not-found-tp5887646p5950159.html
Sent from the Installation, Setup, Upgrades mailing list archive at Nabble.com.
_______________________________________________
Setup mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/setup