Python, Django, PostgreSQL installation

I spent (wasted) a full week back in April on connecting the right versions of Django, Python, and Postgres together on my Mac (running OS 10.5.7). Now it is September and on a whim, as if I had nothing better to do with my time, I decided to upgrade Python from 2.5 to 2.6, somehow forgetting what a mess this caused last time. Everything broke! Here’s how I put it back together, losing just 1 day this time. Hopefully next time I’ll just read this blog post and either stop in my tracks or use these commands.

First install MacPorts. Back in April this is the path that worked for me for getting Postgresql 8.3 and Python 2.5 talking to each other. It installs software, including dependancies, and then figures out how to get everything to hook together.

Today, to upgrade python from 2.5 to 2.6, you type this MacPorts command:

> sudo port install python26

Then you have to tell your machine that 2.6 is the version you want it to use:

> sudo python_select python26

Then you have to reinstall your current installation of django so that it is attached to 2.6, not 2.5

> cd to-your-Django-install
> python setup.py install

Now you have to reinstall that darned psycopg2 connection between Postgres and Python

> sudo port install py26-psycopg2

That last step can take forever, but be patient, because after this step, you can go back to your Django project and type:

> python manage.py runserver

And it will run your application! YAHOO.

A final last step: configure your Eclipse environment is to tell it to use 2.6 for compilation. Within the Pydev perspective, right-click on your project, click PyDev – project type, and under Interpreter click on “Click here to configure an interpreter not listed.” Then add a new Python Interpreter, which took some poking around, but finally “/opt/local/Library/Frameworks/Python.framwork/Versions/2.6/bin/python2.6″ worked (but isn’t what is finally displayed in the window).

Helpful resources:
- Stack Overflow is a pretty useful site and this post helped: http://stackoverflow.com/questions/1213690/what-is-the-most-compatible-way-to-install-python-modules-on-a-mac
- MacPorts download site: http://www.macports.org/
- Some terminal commands I found useful
> sudo port installed (tells you what you have installed)
> locate psycopyg (tells you where you have this driver installed — about 1,000,000 places in my case)



Installing Windows on the Mac


I was going to write this great step-by-step guide to getting Windows applications running on a Mac when I discovered those instructions have already been written by Apple: Boot Camp Installation and Setup Guide. I highly recommend reading and following them! (I didn’t and had to start the whole process over twice.)

In the end, here’s what I did:

  1. using the Boot Camp Assistant already installed by default on my Mac, created a 10 GB partition on my Mac for Windows.
  2. started from within BCA, installed Windows XP on that partition. (This is where the Apple guide comes in very handy.)
  3. rebooted a dozen times while Windows did its thing with all the updates and patches and what-not. (All the things you didn’t think you’d ever have to deal with again because you live on a Mac now.)
  4. on the PC, installed the PC applications I wanted (SPSS in this case)
  5. on the Mac, installed VMWare Fusion so that I can run the PC partition from within the Mac partition. (VMWare Fusion does the same thing as Parallels.) At this point the PC was running within a single window on the Mac.
  6. clicked on that amazing “Unity” button within VMWare Fusion, and voila, the PC applications are now running along side my Mac applications.

Mission Accomplished: a PC-licensed copy of SPSS is living along side a Mac-licensed copy of MSOffice (Excel and Word).



From high school programs to research grants: keeping women in science

The NYTimes has an article today about how the Obama administration (official now!) could make careers in academic research easier for women. The main suggestion is to change the policies around allowing family leave while on research grants. In the familiar theme of Obama-will-fix-everything-wrong-in-this-world, the article is optimistic that good things are about to happen. But also, a lot has happened within our lifetime already!

In 1973, only 6 percent of the Ph.D. scientists employed full time in academia, business or elsewhere were women; by 2006 the number had risen to 27 percent. Over that same time frame, women’s share of full professorships in the sciences quadrupled, to about 20 percent.

Encouraging girls and women to pursue science and technical careers is very important to me, because I was encouraged by high school teachers and summer programs (not to mention my parents) to pursue math and science. In college, I majored in math, but not before dropping out of a physics major, where I had became discouraged and felt ignored. (Apparently physics is a real problem area for retaining women.) Math (applied math, specifically) was a good choice for me in the end and I think everything definitely worked out. But if I had not had that early encouragement in high school, I wouldn’t be working where I am now, or doing what I’m doing.

For the sake of supporting women’s choices throughout their career, let’s hope Obama makes some key changes and appointments.



A Beehive Hive5 on The Big Island of Hawai’i

To share an example of content on IBM’s Beehive, here is a hive five I made about Hawai’i, while there for HICSS.


5 Things to do on The Big Island of Hawai'i
When you aren’t busy at a conference, there are a few things to keep you entertained in Hawai’i. If you are looking for a tourbook, Hawaii The Big Island Revealed is fantastic!
1



See the active volcano, Kilauea! We went to the Hawai’i Volcanoes National Park and hiked Kilauea Iki, which was awesome, even in the rain. Then we took a Doors-Off Helicopter tour over the entire area — very cool!!

2



Hike down into Waipi’o Valley for amazing views and a black sand beach.

3



Sea kayaking and snorkeling day trip. We went to Kealakekua Bay and saw dozens and dozens of spinner dolphins while kayaking and then many fish while snorkeling. We rented everything from Kona Boys.

4



Tour a coffee farm and get a free caffeine buzz. We went to this coffee collective and they had a great tour: Greenwell Farms.

5



Sit in a hammock gazing at the ocean. This is the perfect thing to do at the Hilton Waikoloa Village.

hive5 details:

Hive5 shared by Joan DiMicco on January 13, 2009.



Happy Holidays from Collab-or-Ate


Signing off for the year before heading off to the warmth of California and Hawaii….

In January, I’ll be at the Social Spaces mini-track at HICSS, presenting the paper “People Sensemaking and Relationship Building on an Enterprise Social Network Site.” Hope to see you there!

Don’t forget, before the end of the year, send an email off to Future You!



I’m a Mac (again)

Christmas came early: I got a new MacBook Pro today from my employer. Yipee!
I'm a mac



Politics

I support Barack Obama.I can’t hide my opinion from the blogosphere any more. To all Americans: please, please pay attention to the important issues facing this country. And then please VOTE. Think about the problems we have in the US and the World and think about what you want done about them. And then please VOTE.

I agree with this editorial and it is making me very afraid about the future of this country: Blizzard of Lies.



Talking down to non-techies

I was reading How to Create a Successful Web Site For Nothing (or Almost Nothing) in today’s WSJ, and my jaw dropped at this paragraph:

There’s one more free and easy way to improve the design of your site — using HTML programming code. Fortunately, you don’t need to have programming skills to use HTML. All you need to know is that a block of HTML — essentially, a bunch of gobbledygook words and symbols — can add extra features to your site.

I guess they didn’t have room for the 3 sentences it would take to explain what HTML is, but dismissing it as “gobbledygook” seems a little extreme. The section in the article about how to get your website found by search engines was actually kind of useful. No gobbledygook required.



I’m ready to travel again

After three months of no updates and then some concentrated multimedia complaining (phone, email, web, fax), I’ve been informed by British Airways that “the check is in the mail.” I’m being reimbursed for my expenses during my 3 weeks of no luggage. (Except for the $80 phone charger I bought and then left in some hotel. bummer.) Time to plan my next trip (with carry-on)!



Farmers Markets in the Boston area

Only a month away!

day
hours
when
location
exact location
Mondays &
Wednesdays
11:00 am – 6:00 pm May 28 to November 26 City Hall Plaza, Boston Boston City Hall Plaza (Government Center, along Cambridge Street)
Tuesdays &
Fridays
11:00 am to 6:00 pm May 20 to November 25 Copley Square, Boston Copley Square, along St. James Ave., Dartmouth and Boylston Streets,
Thursdays 11:00 am – 2:30 pm June 5 to November 6 Kendall Square, Cambridge 500 Kendall St.
Thursdays

1:30 pm – dusk June 19 to October 25 Brookline Coolidge Corner, Center Street West Parking Lot, off Beacon St
Saturdays Noon – 3:00 pm End of June – November Jamaica Plain Bank of America Parking Lot, Centre St.
Saturdays

10:00 am – 2:00 pm June 7 to October 25 Cambridgeport Morse School Parking lot. Magazine Street and Memorial Drive
Sundays 1:00 pm – 4:00 pm August to end of October Dorchester Franklin Park Rd., next to Main entrance of the Zoo
Sundays 10:00 am – 5:00 pm May to October South End, Boton In conjunction with the South End Open market next to 540 Harrison Ave.


Diversified portfolio?

no diversity
Walking through the Frankfurt airport I couldn’t help but stop in wonder at this advertisement. There is no diversity in age, color, or gender and apparently that should make me want to invest my money with them?


In case you didn’t get a good look at those names and faces…
no diversity



The Things You Learn While Traveling

I just got home from a long trip. It included my passport expiring while I flew over the Atlantic, my luggage vanishing into thin air after 10 days of being told it would arrive “tomorrow,” and a severely delayed Italian train causing me to end up spending the night at an airport motel in Frankfurt, Germany. Although I love to travel, this time I have never been so glad to return home!


Heathrow Terminal 5, where is all began


A few things I learned on this trip to Europe:

  1. Not all airport immigration officers or airline check-in agents check the expiration dates on passports. I got through Boston and Frankfurt and to the UK border (at Heathrow’s new Terminal 5) before anyone noticed that my passport expired the day before. (Technically it was valid when I took off on March 30th, and invalid when I landed March 31st.)

  2. Apparently the airline that lets on a passenger with an expired passport gets fined £2000 ($US 4000).

  3. You aren’t supposed to travel internationally with a passport expiring within 6 months, but trust me: you can definitely fly like this and no one will make any comments about it.

  4. You can get an “emergency passport” made within a day at a US Consulate office. Bring your passport application and passport photos that comply with US passport photo requirements (not the requirements of the country you are in) and a credit card. If you are in this situation, hopefully you are in a country where they are polite and the office is open at a time when you are able to get there. (For me, this was getting to Edinburgh on a Thursday between 9 and noon. And they were very polite about it.) An emergency passport is valid for 1 year.

  5. When an airline loses your luggage, the rules about reimbursement are very shady and ever changing. The main thing I’ve learned is there is a limit to how much they will reimburse.

  6. Apparently the only items in your luggage the airline will reimburse are clothes and toiletries. Not cameras, electronics or perishables. What’s up with that?? My poor Nikon D40 is what I really care about. I also had 8lbs of Bit O’ Honey in the bag, but that’s another story.

  7. Primark, in the UK, is my new favorite store — the clothes are trendy and awesomely inexpensive. It is like H&M, but much cheaper! Have to admit though, my new wardrobe is already falling apart, but it looked cool for that 1 week…

  8. It is so much easier to travel when you don’t have luggage! And after living this way for almost 3 weeks, I now believe one does not need more than 2 pairs of pants and 2 pairs of shoes, no matter what the purpose of your trip. I’ve heard that before, but now I will live it.

  9. Mainland Europe is so over the shoes and liquids thing. When I went through airport security, all I needed to do was take my laptop out of my bag and take off my coat. What a treat!

  10. The rumors are true: Italian trains do not run on time. A 2-hour train trip from Venice to Florence took 4.5 hours and at one point the train was actually moving backwards. I learned this is not considered a good excuse for missing your flight, according to your German airline. So I’ve learned that you should not rely on Italian transportation to get you to your airplane on time. Next time, build in at least a day buffer.

  11. After spending much time in UK, Italian and German airports, I have to say the pastries are better in Germany’s, the coffee is better in Italy’s (duh), and mmmm, well, they are good at losing your bags at Heathrow. Another observation is that it is easier to buy a replacement phone charger in Germany, but it is half the price in the UK. I couldn’t find one in Florence’s airport.

  12. The other rumors are true: the Dollar is doing horribly against the British Pound and the Euro. So if you are in the US, I advise you drop what you are doing right now and go shopping! (Now if only we had Primark…)

After all this negativity, I have to say, the trip wasn’t all bad: the first conference was interesting, the second conference was stimulating and fun to see lots of friends, and traveling afterwards in Italy with Mike was exciting as always. I also had fabulous meals throughout Italy.

And I got a camera phone picture of my new favorite store:
Primark!



Looking back or looking forward

FutureMe.org
If you are like me, during this week between Christmas and New Years, you are spending some time reflecting on the past year and thinking a bit about the next year. If you are, then have I got a website for you! FutureMe.org! FutureMe allows you to write an email to your future self. You write yourself a note, set a delivery date in the future (at least 1 year into the future), and then you promptly forget what you wrote. Then when the date arrives, you get an unexpected blast from the past.

I’ve been using FutureMe.org for years, for all sorts of future-related emails. It is always an excellent surprise to get these messages. I just got an email today that I wrote last Christmas about how nice the holiday with my family had been. My favorite, and most unexpected, email arrived on my PhD graduation day. I had written a note several years beforehand of both congratulations and encouragement, hedging my bets that maybe I was graduating, but maybe I wasn’t, and that was A-O-K.

Happy 2008! And send off a message to the future today!



Admit it, you don’t read

don't read
Do you read as much as you wish you did? Do you pretend that you’ve read more than you have?

I’m not going to hide anymore. I recently, openly confessed that, except for during that rushed last moment before a paper is due and I don’t have any post-millennium “related works” in the related works section, I haven’t read an academic paper this year.

I also haven’t been reading books. A month ago I hauled off a pile of (presumably) wonderful non-fiction books to the used bookstore that I hadn’t touched. I’m in a bookclub, where we read one fiction book a month. I haven’t even purchased the last four books.

(So you don’t think I’m illiterate, I’ll also confess that I read, well skim, the WSJ and the NYTimes everyday, and I justed finished a historical novel, Loving Frank. So it isn’t like I’m totally not reading, it is just that I don’t read nearly as much as I wish I did.)

Last week I read a review of yet-another-book-I-won’t-read called “How to Talk About Books You Haven’t Read.” And since I read the review, I feel qualified to give my opinion on the book without having read it. It sounds great! Apparently the main gist is:

Not to worry, Mr. Bayard counsels. Just because one hasn’t read a book doesn’t mean that one cannot talk about it with the same confidence as someone who has, and perhaps with greater acumen, not having to get bogged down in messy details.

What a relief! I will attend my bookclub this month, with or without having the book, and I will give my opinion!

I know I’m not alone in hiding my non-reading. Particularly in the field of research, where we feel we should be reading everything related to our own research, it is hard to admit we aren’t. The most concrete piece of evidence I have that researchers fake it is at least 50% of the papers that reference my research have significantly misstated my research findings. If those authors are not reading my papers, then oh my gosh, who is??



I want…

a Gelaskin for my iPod Nano! (Pictured right and available here.)
nano skin

Obviously I’m not blogging much and I’m only barely keeping up with my favorite blog, but I have seen some funny posts today. Cameron blogged about the things people hate the most. And Nelson blogged about how exhausting half-day language lessons can be, particularly when you must fit in a nap and a glass of wine all before dinner.

Mike and I just got back from vacation in Brazil, where we spent our time enjoying the sun and water, evaluating the quality of the caipirinhas, and worrying a great deal about where we would find our next brigadeiro. Exhausting. :)