简体   繁体   English

更高版本的Python会构建Node.js吗?

[英]Will a higher version of Python build Node.js?

I'm running the latest Ubuntu (14.04) and have just downloaded the Node.js tarball. 我正在运行最新的Ubuntu(14.04),刚刚下载了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 :/ 我对Python不是很熟悉,虽然我喜欢Ubuntu,但我也不熟悉在Linux上下载和安装东西的过程:/

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. 它在Node.js下载页面上说需要Python 2.6或2.7,但我发现可以使用更新版本的Python。 Will a newer version of Python build it correctly? 新版本的Python会正确构建吗?

If you're not familiar with Linux then I don't think you want to compile node.js yourself from source. 如果您不熟悉Linux,那么我认为您不想自己从源代码编译node.js. You can still use the binaries.tar.gz 你仍然可以使用binaries.tar.gz

There are Ubuntu packages that will install node.js for you! 有Ubuntu软件包可以为你安装node.js! 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 从包管理器安装更容易,请尝试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 至于从源代码构建,Python 3中存在已知问题,参考https://github.com/joyent/node/wiki/installation#known-issues ,因此可能坚持使用2.6或2.7

Python versions starting with and including 2.6 up through before 3.0 should work fine. 从3.0开始到3.0之前的Python版本应该可以正常工作。 Python 3 brought some backwards incompatible changes with Python 2.x and AFAIK gyp has not been updated to support Python 3 yet. Python 3为Python 2.x带来了一些向后不兼容的变化,AFAIK gyp尚未更新以支持Python 3。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM