MySQL-python via easy_install on OSX. Not so fast.

I am trying to set up this blog's software, which I wrote on python, on the Macbook as opposed to the old Vista desktop I wrote it on. No luck so far. Doubt i have the patience to fix all the compile and egg errors. It might be easier to rewrite the blog in lisp and upload it as one big .emacs file.

Apache is already installed on OSX. To activate it go to SystemPreferences/Sharing and then click on Web Sharing. The httpd.conf file is located in /etc/apache2/.

Making Black and White Photographs in Apple's Preview App

I have been using gimp to convert my photographs into black and white and have not really been happy with the process.

At work I use photoshop, but it is a super heavy application to use just to convert pics into black and white. It is also expensive as an application and I don't want to go that cost as all I do is convert stuff to black and white. Photoshop does have a very cool converter though where you control the colors.

Gimps mechanism for turning photos black and white is with grey scale. I normally saturate the colors to around 20%-30% and then grey scale it. After that about all I play with is the contrast.

Apple's Preview application that comes with OSX has far better manipulation tools for color. I only just worked out how to turn a picture black and white from the Preview app. Saturation to nothing and it is black and white: hola. No need for gimp or photoshop.
My shiny new Mac Pro came last week. However, getting Oracle's Service Bus up and running on it is a bit of a task. This blog entry has details of how to set up OSB and run it in the server view in Eclipse 3.3 on Mac OSX.

Update. We have the OSB running in Eclipse 3.3 and the EAR running in Eclipse 3.5; as long as they aren't started or republished at the same time they are ok. We start one and then the other. It is a pretty laborious process to get it all set up and working flawlessly. We went through a couple of days of unhelpful eclipse errors and oracle's plugins crapping out with no understanding as to why. Once we got it working we left it alone.
Eclipse.ini is in $ECLIPSE_HOME, which in OSX translates to:

/Applications/eclipse35/Eclipse.app/Contents/MacOS/eclipse.ini

The eclipse35 folder is where I stored the Galileo build of eclipse.
Trying to run weblogic from eclipse on Mac OSX is leading to this error:

Unable to find tools.jar within Java VM associated with target WebLogic runtime; features dependent on tools.jar may not function

From the Apple website:

tools.jar does not exist. Classes usually located here are instead included in classes.jar. Scripts that rely on the existence of tools.jar need to be rewritten accordingly.

So it probably a script issue on weblogic's side.

Went through all the scripts that have tools.jar and removed it. No luck. Solution was to get a new instance of eclipse and reinstall everything.

Software Updater on Mac OSX Not Working Due To Font Error

I was having the problem with 10.6 where the software updater was hanging. This was particularly annoying as I was sweating on a printer driver install. I ran the software updater from the command line with;

sudo softwareupdate -i -a

The output was:

2010-03-12 14:18:23.460 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier:
/Library/Receipts/Office2008_en_automator.pkg
2010-03-12 14:18:23.462 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier:
/Library/Receipts/Office2008_en_automator_workflow.pkg
2010-03-12 14:18:23.462 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier:
/Library/Receipts/Office2008_en_autoupdate.pkg
2010-03-12 14:18:23.463 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier: /Library/Receipts/Office2008_en_clipart.pkg
2010-03-12 14:18:23.464 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier: /Library/Receipts/Office2008_en_core.pkg
2010-03-12 14:18:23.464 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier: /Library/Receipts/Office2008_en_dock.pkg
2010-03-12 14:18:23.465 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier:
/Library/Receipts/Office2008_en_entourage.pkg
2010-03-12 14:18:23.466 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier:
/Library/Receipts/Office2008_en_entourage_help_std.pkg
2010-03-12 14:18:23.466 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier:
/Library/Receipts/Office2008_en_equationeditor.pkg
2010-03-12 14:18:23.467 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier:
/Library/Receipts/Office2008_en_errorreporting.pkg
2010-03-12 14:18:23.468 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier: /Library/Receipts/Office2008_en_excel.pkg
2010-03-12 14:18:23.468 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier:
/Library/Receipts/Office2008_en_excel_help_std.pkg
2010-03-12 14:18:23.469 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier: /Library/Receipts/Office2008_en_fonts.pkg
2010-03-12 14:18:23.469 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier: /Library/Receipts/Office2008_en_graph.pkg
2010-03-12 14:18:23.470 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier:
/Library/Receipts/Office2008_en_helpviewer.pkg
2010-03-12 14:18:23.471 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier: /Library/Receipts/Office2008_en_launch.pkg
2010-03-12 14:18:23.471 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier:
/Library/Receipts/Office2008_en_messenger.pkg
2010-03-12 14:18:23.472 softwareupdate[1964:451f] PackageKit: ***
Missing bundle identifier: /Library/Receipts/Office2008_en_ooxml.pkg

The problem is duplicate fonts which seems to happen with Microsoft Office installs with Snow Leopard. The fix is actually quite simple. Go into Font Book which is in the applications folder and right click on each font that is duplicated. You will find these with a little yellow triangle. Font Book will have as an option on the menu to remove the duplicate font. You have to go to each font one by one though to do it.

After this the software updater worked as it was supposed to and did not hang.
I recently dragged the Applications folder of the stack part of the dock on OSX. When I dragged it back it showed the address book icon. The fix is actually quick simple; right click the applications stack (or ctl-click or hold down a click) and then under Display As click on Folder.
I am finding Sequel Pro fairly easy and intuitive to use for building a schema in MySQL.

EnvironmentError: mysql_config not found

Installing MySQLdb for Python on Mac OSX gave this error;

Cams-MacBook-Pro:MySQL-python-1.2.3 cam$ python setup.py install
sh: mysql_config: command not found
Traceback (most recent call last):
  File "setup.py", line 15, in 

The MySQL installs for OSX can be all over the place. The mysql_config was located at /usr/local/mysql/bin on my machine. So that setup.py can find mysql_config, modify in site.cfg the entry;

# The path to mysql_config.
# Only use this if mysql_config is not on your PATH, or you have some weird
# setup that requires it mysql_config = /usr/local/mysql/bin/mysql_config

Then run python setup.py install again. Next error:

unable to execute gcc-4.2: No such file or directory
error: command 'gcc-4.2' failed with exit status 1

So off to the Apple Developer website, create a new account because the last time I used it was when I downloaded XCode on the other Macbook, then download the entire XCode install just to get gcc. Bloody hell.
Next 10 articles

Most Popular on South Sea Republic

The articles that have been viewed the most:

Most Popular Restaurants in Phoenix

Phoenix Eats Out is the restaurant review site for Phoenix, Scottsdale and Old Town Scottsdale which lists the modernist and contemporary restaurants, taverns and bars in the greater Phoenix area. This is the list of the most popular restaurants pages from phoenixeatsout.com that have been viewed the most; My personal favourite restaurants in Phoenix are AZ88, Postinos, Bomberos with Grazie, Humble Pie, Orange Table, The Vig, Fez and others coming close behind. View the complete list with the photo-journalistic style images on phoenixeatsout.com

Most Popular Hikes in Arizona

Arizona is an outdoor state and has lots of hiking in the city and around the state. Phoenix is unusual for most cities in having several large mountains in the center of the city with great hiking. Anyone who comes to Phoenix has to do the Echo Canyon trail on Camelback and the Summit Hike on Squaw Peak or Piesta Peak. The views of the city, suburbs and surrounding mountains are wonderful from Camelback and Piesta Peak. For more experienced hikers there is the McDowell Mountains in North Scottsdale that has several difficult and strenuous hikes in Tom's Thumb and Bell Pass. Alternatively, you can hike the highest mountain in Arizona. At 12,600 feet Humphrey's Peak is a long and difficult hike.

Alternate Australian Constitutions

Between 2004 and 2009 this site, southsearepublic.org, was a constitutional blog based on scoop which focused on Australian and global constitutional issues. One of the strongest aspects of it was the development of constitutions by those involved in the blog. These constitutions are the outcome: The constitutions were built using principles from Montesquieu's separation of powers, the enlightnment's universal political rights and the ancient Athenian technology of sortition and choice by lot.

Archives For South Sea Republic

South Sea Republic started in 2004 as an Australian constitutional blog in 2004 based on scoop software. It was an immigrative outgrowth of Kuro5hin. The archives for each year since then; The articles are ordered by views.

Who Is Cam Riley

Cam Riley I am an Australian living in the United States as a permanent resident. I am a software developer by trade and mostly work in Java and jump between middleware and front end. I originally worked in the New York area of the United States in telecommunications before moving to Washington DC and working in a mix of telecommunications, energy and ITS. I started my own software company before heading out to Arizona and working with Shutterfly. Since then I have joined a startup in the Phoenix area and am thoroughly enjoying myself.

I do a lot of photography which I post on this website, but also on flickr. I have a photo-journalistic website which lists the modernist and contemporary restaurants in phoenix. I have a site on the Australian Flying Corps [AFC] which has been around since the 1990s and which I unfortunately lost the .org URL to during a life event; however, it is under the www.australianflyingcorps.com URL now. The AFC website has gone through several iterations since the 90s and the two most recent are Australian Flying Corps Archives(2004-2002) and Australian Flying Corps Archives(2002-1999) which are good places to start.

Websites Worth Reading

Websites of friends, colleagues and of interest;