3

I need to parse a potentially large json file. So I looked for solutions to help me and found the ijson library. Seems to perfect for this purpose.

I installed it with pypm (I use Active Python), ports and directly with the supplied setup script.

But as soon as I

import ijson 

I get an error

Exception: YAJL shared object not found.

The culprit seems to be the function util.find_library('yajl'), which is looking for a module named 'yajl' - which I have installed, too! But which find_library does NOT find.

Warning: I am not a UNIX (or OSX) expert. I can handle Python fine but are totally helpless when it comes to things which might be totally simple to anyone educated in UNIX/Linux.

Markus Breuer
  • 117
  • 1
  • 6

1 Answers1

0

From the ctypes docs:

On OS X, find_library() tries several predefined naming schemes and paths to locate the library, and returns a full pathname if successful

Looking at the source, the dyld_find function is called eventually:

def dyld_find(name, executable_path=None, env=None):
    """
    Find a library or framework using dyld semantics
    """
    name = ensure_utf8(name)
    executable_path = ensure_utf8(executable_path)
    for path in dyld_image_suffix_search(chain(
                dyld_override_search(name, env),
                dyld_executable_path_search(name, executable_path),
                dyld_default_search(name, env),
            ), env):
        if os.path.isfile(path):
            return path
    raise ValueError("dylib %s could not be found" % (name,))

I have zero Mac experience, so I'm not able to help any further. Perhaps looking at the dyld documentation can give some hints.

codeape
  • 97,830
  • 24
  • 159
  • 188