4

First, props to whoever did node.js. I've been using it for less than a day and I'm already thinking about using it for stuff I use Python for now.

In fact, whoever did node.js should think about using it for stuff they use Python for now. There is apparently a tool called node-waf that is in Python and is necessary for npm to work and npm of course is necessary for anything else useful.

I think that my original install went bad because node-waf (which is in /mnt/michael/bin/node-waf) couldn't find Scripting.py (which is in /mnt/michael/node/tools/wafadmin/; it was looking in non-existent /mnt/michael/node/tools/../lib/node/wafadmin/). So I hacked node-waf to point to the right director and kept going and found a much more serious problem.

Turns out node-waf isn't written in "Python", but in Python2.6, which is a perfectly good language, it's the language I use myself, but it isn't the language that the default on the system I use. The system is CentOS, which requires Python2.4 be the Python that the command "python" invokes. Yes, that's foolish on the part of the CentOS people but less foolish than the same mistake on the part of the node-waf people, since they are necessarily subject to the rules of the OS.

So, please tell me there's some switch I haven't found yet that say "Use Python2.6". Also, any hints about a proper install would be appreciated.

Andreas Köberle
  • 106,652
  • 57
  • 273
  • 297
Michael Lorton
  • 43,060
  • 26
  • 103
  • 144
  • Are you saying you had to hack the node install script because it's not compatible with the older Python 2.4? And now npm won't install? – NeonNinja Aug 14 '11 at 10:09
  • No, I hacked it so it would find its own Python scripts. – Michael Lorton Aug 14 '11 at 14:04
  • See http://stackoverflow.com/questions/3819313/cant-configure-node-js-for-make-install-on-os-x-snow-leopard/3830577#3830577 node.js don't include waf correctly – mmmmmm Oct 03 '11 at 13:04

1 Answers1

3

To solve the path problem, I backed up and re-installed Node. To solve the version problem, at the suggestion of some bright soul on the #nodejs channel, I created a symbolic link at ~/bin/python that pointed to the right version (that solved a lot of my own problems too, starting up the wrong version from the command line...) An obvious hack, but when you're frustrated, you overlook the obvious.

Michael Lorton
  • 43,060
  • 26
  • 103
  • 144