>>> 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)
尝试导入pylibmc,尝试导入_pylibmc.so
我正在使用Mac OSX 10.5.6
答案 0 :(得分:2)
这很奇怪。我(pylibmc的开发人员)使用Mac OS X 10.6.3开发pylibmc,libmemcached 0.38应该没问题。
尝试下载实际的tarball并解压缩,然后:
$ sudo python setup.py install --with-libmemcached=/path/to/libmemcached-0.38
(lots of output)
$ python -m pylibmc -v