{"id":129,"date":"2011-03-02T09:55:25","date_gmt":"2011-03-02T13:55:25","guid":{"rendered":"http:\/\/myblog.vindaloo.com\/?p=129"},"modified":"2011-03-02T10:01:36","modified_gmt":"2011-03-02T14:01:36","slug":"py2exe-anydbm-error","status":"publish","type":"post","link":"http:\/\/myblog.vindaloo.com\/?p=129","title":{"rendered":"py2exe + anydbm error"},"content":{"rendered":"<p>So, I tried something simple yesterday adding a call to anydbm to a python program that I plan to distribute on windows with py2exe. Doing so I ran into this error:<\/p>\n<pre><code><strong>ImportError: no dbm clone found; tried ['dbhash', 'gdbm', 'dbm',\u00a0 'dumbdbm']<\/strong><\/code><\/pre>\n<p>Turns out that the way py2exe works though it misses the dependency that anydbm has on a db module. The moral of the story is that if you want to use anydbm and py2exe you need to do something like:<\/p>\n<pre><code><strong>\r\nimport anydbm, dbhash\r\n\r\nf = anydbm.open(\"dbname.db\", \"c\")\r\n...\r\n<\/strong><\/code>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>So, I tried something simple yesterday adding a call to anydbm to a python program that I plan to distribute on windows with py2exe. Doing so I ran into this error: ImportError: no dbm clone found; tried [&#8216;dbhash&#8217;, &#8216;gdbm&#8217;, &#8216;dbm&#8217;,\u00a0 &#8216;dumbdbm&#8217;] Turns out that the way py2exe works though it misses the dependency that anydbm &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/myblog.vindaloo.com\/?p=129\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;py2exe + anydbm error&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-129","post","type-post","status-publish","format-standard","hentry","category-open-source"],"_links":{"self":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts\/129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=129"}],"version-history":[{"count":6,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts\/129\/revisions"}],"predecessor-version":[{"id":131,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts\/129\/revisions\/131"}],"wp:attachment":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=129"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}