开发者

How do I get node-waf to install?

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜