{"id":304,"date":"2009-10-24T10:49:00","date_gmt":"2009-10-24T10:49:00","guid":{"rendered":"http:\/\/new.cottee.org\/2009\/10\/snow-leopard-and-32bit-64bit-psycopg-woes\/"},"modified":"2009-10-24T10:49:00","modified_gmt":"2009-10-24T10:49:00","slug":"snow-leopard-and-32bit-64bit-psycopg-woes","status":"publish","type":"post","link":"https:\/\/cottee.org\/?p=304","title":{"rendered":">Snow Leopard and 32bit 64bit Psycopg woes"},"content":{"rendered":"<p>><\/p>\n<div xmlns='http:\/\/www.w3.org\/1999\/xhtml'><span>Ah yes, let&#8217;s quickly do some work this morning. How soon that turns into watching multiple parts of your development environment fail. <\/p>\n<p>I want to pull some data from a Microsoft SQL Server and into Postgres using Python\/Django. The ODBC drivers come from http:\/\/www.actualtechnologies.com and I paid 30 quid for a small license that allows 5 concurrent users. It&#8217;s only me using it so I only need one so that&#8217;s cool. I say 30 quid -that&#8217;s for\u00a0 Mac. If you want to use their Linux version it will be somewhere around 600 quid. Hey ho. Well ok &#8211; I&#8217;ll just do this on a Mac then. <\/p>\n<p>Now the problems start. Basically, the ODBC drivers won&#8217;t work with 64 bit apps. OK, So I&#8217;ll force my Snow Leopard python into 32 bit mode using. <\/p>\n<p><code>    jlp:~ icottee$ defaults write com.apple.versioner.python Prefer-32-Bit -bool yes<\/code><\/p>\n<p>Now psycopg2 won&#8217;t work. And I spend some time faffing around. Eventually I discover to get psycopg2 to work you&#8217;ll need to get yourself a 32 bit version of postgres. So the magic rule is download the code for postgres, configure and make install it AFTER you have done:<\/p>\n<p><code>    export CC=\"gcc -arch i386\"<\/code><\/p>\n<p>Now you reinstall psycopg2 and wahey you can at last get on with what you were supposed to be doing. <br \/><\/span><\/p>\n<div class='zemanta-pixie'><img src='http:\/\/img.zemanta.com\/pixy.gif?x-id=3655362a-575d-8178-a64f-4d46aec76dcf' alt='' class='zemanta-pixie-img'\/><\/div>\n<\/div>\n<div class=\"blogger-post-footer\"><img width='1' height='1' src='https:\/\/blogger.googleusercontent.com\/tracker\/9210244490645736884-9008157997953595668?l=blog.cottee.org' alt='' \/><\/div>\n","protected":false},"excerpt":{"rendered":"<p>> Ah yes, let&#8217;s quickly do some work this morning. How soon that turns into watching multiple parts of your development environment fail. I want to pull some data from a Microsoft SQL Server and into Postgres using Python\/Django. The ODBC drivers come from http:\/\/www.actualtechnologies.com and I paid 30 quid for a small license that allows 5 concurrent users. It&#8217;s only me using it so I only need one so that&#8217;s cool. I say 30 quid -that&#8217;s for\u00a0 Mac. If&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/cottee.org\/?p=304\"> Read More<span class=\"screen-reader-text\">  Read More<\/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":[2],"tags":[],"class_list":["post-304","post","type-post","status-publish","format-standard","hentry","category-oldsite"],"_links":{"self":[{"href":"https:\/\/cottee.org\/index.php?rest_route=\/wp\/v2\/posts\/304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cottee.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cottee.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cottee.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cottee.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=304"}],"version-history":[{"count":0,"href":"https:\/\/cottee.org\/index.php?rest_route=\/wp\/v2\/posts\/304\/revisions"}],"wp:attachment":[{"href":"https:\/\/cottee.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cottee.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cottee.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}