Will a higher version of Python build Node.js?

爱⌒轻易说出口 提交于 2019-12-11 10:29:12

问题


I'm running the latest Ubuntu (14.04) and have just downloaded the Node.js tarball. I'm not very familiar with Python though, and although I love Ubuntu, I'm also not familiar with the process of downloading and installing stuff on Linux as well :/

It says on the Node.js download page that Python 2.6 or 2.7 is required, but I have found that newer versions of Python are available. Will a newer version of Python build it correctly?


回答1:


If you're not familiar with Linux then I don't think you want to compile node.js yourself from source. You can still use the binaries.tar.gz

There are Ubuntu packages that will install node.js for you! Installing from a package manager is easier, try https://github.com/joyent/node/wiki/installing-node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions

As for building from source, there are known issues with Python 3, ref https://github.com/joyent/node/wiki/installation#known-issues, so maybe stick with 2.6 or 2.7




回答2:


Python versions starting with and including 2.6 up through before 3.0 should work fine. Python 3 brought some backwards incompatible changes with Python 2.x and AFAIK gyp has not been updated to support Python 3 yet.



来源:https://stackoverflow.com/questions/26209021/will-a-higher-version-of-python-build-node-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!