osx

Psycopg on Mac OS 10.8 with Python 2.7 and Postgresql 9.2

in 10.8, lion, mountain, osx, postgre, postgresql, psycopg, psycopg2, python, troubleshooting

I don't have time for a full tutorial, but here is how I managed, after weeks of trying without luck, to get Psycopg2 to work with Python 2.7.3 and PostgreSQL 9.2 on Mac OS 10.8, Mountain Lion.

The problem I was having, after installing Psycopg using python setup.py install was related to this error when running import psycopg2 from a Python shell. Symbol not found: _PQbackendPID.

This fixed it:

  1. You'll need XCode from the App Store and the Command Line Tools (Google it if this sounds like gibberish).
  2. Follow the instructions about exporting your path here: http://www.jonathandean.com/2011/08/postgresql-8-4-on-mac-os-x-10-7-lion/. This will make your Postgresql 9.2 the default. You can check if it already is by typing which psql in a Terminal window.
  3. Create a Universal libpq.dylib following instructions here: http://contestclash.blogspot.com/2009/09/building-psycopg2-on-snow-leopard.html. Copy the new file to wherever your Postgresql is. In my case it was /Library/PostgreSQL/9.2/lib. These instructions solved the 64/32 bit architecture problem. (This crucial piece of info was burried in Google and took quite a while to find. All other solutions suggested running Python in 32 bit mode, which didn't work).
  4. Modify the psycopg2 setup.cfg file following these instructions (only the last part, right after "Change setup.cfg so it looks like the following:"): http://blog.timc3.com/2010/08/20/psycopg2-os-x-_pqbackendpid/.
  5. Create the simlinks mentioned in the comments here in order to fix a new problem with SSL and Crypto libraries: http://psycopg.lighthouseapp.com/projects/62710/tickets/111-library-not-loaded-libssl100dylib
  6. Now build psycopg2 using "python setup.py install".
  7. You should be able to import psycopg2 from a Python shell or from IDLE (I actually did it for EPD free).

Many, many thanks to each of the four sources cited in steps 2-6. You did all the work. All I needed to do was find which instructions to follow.

I hope this helps others struggling with this issue.

To be fair... not D-Link's fault, Apple's!

in apple, macbook pro, macosx, network, osx, wireless

It's been a while since the complaint and I've been working on it. Now I am sure it's not D-Link's fault. Just the amount of posts by people with Macbook pro's and weird network trouble is overwhelming. Check out this thread:

I haven't been able to solve it and it's driving me crazy. It seems to be a software issue related to the Airport extreme card. Changing the card has been useless to many.

If ever manage to fix it, I'll post detailed instructions. I promise.

I hate Apple right now. The first post in that thread is more than one year old (and several Software Updates --up to 10.5.6-- and specific Airport Updates --last was 2008-4!--).

Fortunately the problem only occurs in the office (ha) and never at home!

Guild Wars on my Macbook pro (2nd attempt), success!

in games, guildwars, leopard, mac, osx

When I bought my Mac I made sure I could run Guild Wars, the one online game I play. I booted into Windows every time I wanted to play and it wasn't too much of a hassle. It wasn't ideal either. Then parallels came up with DivX support for Intel Macs and I bought it. I posted something about it a while back. It was painfully  slow. Unplayable.

Yesterday I searched for another solution (don't really know why or what I was originally looking for) and found Crossover, another virtual machine software (that doesn't actually install Windows so it doesn't need a license for it). I downloaded the trial version and installed GW. Then I copied the data file from the Windows partition into the folder in Crossover where the game resided  and ran the game. The process took a while to figure out, I have to say. Graphics were bad. But in the process I had found a page with advice: Compatibility Tips. It worked.

It works great. Graphics aren't as nice as in native Windows on the Macbook pro, but they are as good as they are on my old PC, a Thinkpad T40. It runs pretty smoothly. I now have Guild Wars on my Mac, running Leopard and Crossover. I tried making a video with iShowU, but it lagged the [game] video and didn't make justice to Crossover.

I just say... it's the best solution I've found for running GW on a Mac. I've successfully played Random Arenas a few times.