views:

266

answers:

1
>>> import pylibmc

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pylibmc.py", line 55, in <module>
    import _pylibmc
ImportError: dynamic module does not define init function (init_pylibmc)

Trying to import pylibmc, which tries to import _pylibmc.so

I'm using Mac OSX 10.5.6

+1  A: 

That's very odd. I (the developer of pylibmc) use Mac OS X 10.6.3 to develop pylibmc, and libmemcached 0.38 should be fine.

Try downloading the actual tarball and unpacking it, then:

$ sudo python setup.py install --with-libmemcached=/path/to/libmemcached-0.38
(lots of output)
$ python -m pylibmc -v
lericson
oops forgot to close this one, but yes, that's what I ended up doing. Thanks for making pylibmc :)
resopollution