Posts Tagged ‘python’

mod_wsgi compile error: missing Python development package?

Tuesday, September 22nd, 2009

If you’re seeing an error like this when trying to compile mod_wsgi, it’s likely that you don’t have the Python development package installed. Solution: apt-get install python-dev

Turns out, a lot of things can go wrong when you try to compile mod_wsgi, and I spent a good chunk of time before finding it out here. I hope that by posting this here, I would save others the headache. The last few lines of the error was quite misleading, imho. But like they all say, in hindsight, everything’s 20/20

root@jaysern:/usr/local/mod_wsgi-2.5# make > error
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
/usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/include/python2.6 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
mod_wsgi.c:113:20: error: Python.h: No such file or directory
mod_wsgi.c:114:21: error: compile.h: No such file or directory
mod_wsgi.c:115:18: error: node.h: No such file or directory

*** snip ***

mod_wsgi.c:11684: error: expected expression before ')' token
mod_wsgi.c:11691: error: expected ';' before 'ap_log_rerror'
mod_wsgi.c:11696: error: expected ';' before '}' token
mod_wsgi.c:11710: error: expected expression before 'module'
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1
root@jaysern:/usr/local/mod_wsgi-2.5#

A change in direction: Python, Django, and Google App Engine

Saturday, June 13th, 2009

This is a cross-post from my other for-own-use developer blog. I’m posting it here because people often ask me what I’m so busy with.

It’s been a while since my last post; I have been real busy. Anyway, just to quickly say this, I’ve made a change in direction in my development efforts.

I’ve said earlier that I am determined learn a new programming language this year because my brain is starting to rot, but have since decided a few months ago that it will not be Cocoa Touch, for various reasons: too niche (the emerging global mobile apps market is highly fragmented by Nokia, iPhone, Android, Crackberry and possibly Palm as a viable contender), and skills here only attacks a small piece of my larger effort, which my gut tells me it’s a task that could probably be farmed out and done cheaper/faster by outsourcing to a iPhone dev shop where Cocoa Touch is their core competency.

A mobile app that does not utilize any connectivity, nay, “intelligent” connectivity, is not much different from calc.exe on your WinXP desktop. It’s fine for a narrow and specific, uninteresting task. An interesting mobile app would tap the cloud for some form of intelligence. Why not leverage that mandatory data plan from AT&T for your iPhone?

When the time comes, if necessary (such as if the iPhone app will be an important part of my competitive advantage), then I’ll pick up Cocoa Touch myself. For now, I do not think that will be the case, thus I’m going to spend more time on laying the groundwork for the more important piece: the back-end, web 2.0 / cloud computing / SaaS piece. And as Microsoft knows, as Tim O’Reilly says – nobody with their right mind would bet against the Web! (Have you seen HTML5?)

The past month or two, I’ve tried real hard to squeeze time in to learn Python, Django and Google App Engine – all at the same time in parallel, not sequentially. Yes, I’m trying to rush – because I am impatient.
(more…)

My App Engine “Wall”

Friday, June 13th, 2008

I was messing around with Google’s App Engine this week, and learning some Python (the programming language, not the snake! I had someone ask me that) at the same time.

App Engine (for scalability reasons) does not support SQL, but instead provide and API they call Datastore for persistent storage. For the app I made, I queried for data ordered by date, but for some reason the result set still comes out unordered. Odd. I’m probably not calling it right. Anyway, it was just an exercise to see what App Engine was all about.

Here’s a replica of the Facebook Wall I made, feel free to write your heart out. As you can see, I’ve had friends say some really nice things about me already. The full address is liew.appspot.com .. but there’s an iframe to it if you’re too lazy to click on that link :)

Update 6/15/2008 — Tinkered around a little and realized why its unordered .. I lost the timestamps on some of the posts, so for those that come out unordered, it’s because there are no records of which came first (the timestamp was NULL). It should be fine going forward. The un-stamped posts take precedence in ordering over the stamped ones, so you may have to scroll down a little to see your post (or just CTRL-F it).