Repository navigation
Support for Python 3 #193
Description
Activity
Ditto on #194: this is an issue with upstream gyp, and in fact they are aware of the problem: http://code.google.com/p/gyp/issues/detail?id=36
Go make some noise in that issue if you want to see Python 3 supported (or better yet, send the patch!).
Reacted by Natta Wang and Cédric ColinAs someone who doesn't do Python: why is there still so much incompatibility? Python 3.0 was released on 2008 and has a lot of advantages over 2.x, so why does 2.x still hold so much predominance?
Reacted by Tyler Sheaffer, Uli Köhler, Wnbot, A. Lloyd Flanagan, Yahor Siarheyenka, Dan Vicarel, Anna Wilcox, James Blackmer, Rafael Alves, xiaodeaux and 22 moreI've started a petition, you can sign it there: https://www.change.org/petitions/google-inc-upgrade-gyp-to-support-phyton-3
@unbornchikken Er, you may want to correct a typo in the petition: "Phyton 3".
Reacted by Nino Filiu, hzmi, Lê Quang Lâm and Jahan Addison@unbornchikken Is everything a petition nowadays...? Nevermind, signed.

@mcandre Well, that's because he's phyton for it.
Reacted by Amelio Vazquez-Reina, Gabriele D'Arrigo, Tyler Sheaffer, Lena, Maksim Koryukov, zhangyubaka, I Shall Be, Aymeric Beaumet, Giacomo, One_1 and 10 moreReacted by Carson McManus, Lena, Maksim Koryukov, Artjom Simon, Ricardo Portugal, Aymeric Beaumet, Dan Vicarel, Akash Rajendra, Arnaud Lejeune, Abhimanyu Aryan and 4 moretypo fixed. never start a petition after midnight.
meme idea: i do petitions instead of PRs 😊
Reacted by Abhimanyu Aryan, datsteves, Antti Pihlaja and Paulo CoghiI appreciate the sentiment, but I believe Google is going to be focusing their time on
gnthese days. They have plans to phase out gyp before the end of 2014. I'm looking for some time/motivation to writenode-gn😄Reacted by Raymond Hulhahm, should i start a new petition? 😊
i think it's maximum a couple days of work to update gyp scripts to p3, it can be done if they care. the problem is that v8 guys are thinking in v8 even today, but there is a mutch larger dependent platform to care, but they don't. i can understand, they got dollars for v8 not for node. maybe online activity like petitions will wake up their bosses, and give guys some days to patch shit up.
For motivation: start a repo, and put a Donate button in the readme. You will be suprised. ;)
@TooTallNate Then you'll just have to make massive pull requests for each package out there that uses
node-gyp. No biggie :)(On all honesty, I'm rooting for something better to come along).
coz da petition didnt help: https://github.com/unbornchikken/cmake-js
Reacted by Jack McKernan and Antti PihlajaPlease try to use
env python2. The current version ofnode-gypcompletely breaks on distributions that have their default Python binary set to Python 3.Looks like they are working on it.
Is there any reason why node-gyp can't autodetect the location of python2 and use that to run gyp?
Reacted by Sami34 remaining items
What is the block here? There's a tool for AUTOMATED migration to Python 3: https://docs.python.org/2/library/2to3.html
It's part of the core Python library itself!@devinbost Unfortunately, that tool only migrates some parts of the code. Some bigger breaking changes then still need to be fixed manually.
Hold your horses! It seems like something is afoot: 66ad305
Reacted by Ian DanforthReacted by RN4N@kumarharsh Now way 🤞!
The Python 3 tests are currently run in allow_failures mode: https://travis-ci.com/nodejs/node-gyp
If we can get those test to be green and drop the allow_failures mode then we can 🚀 🎉 🍾
Please review any Python pull requests and provide fixes for the failing tests if you can.
Finally after 6 years :)
Reacted by Alex Devero, Yahor Siarheyenka and Saran Tanpituckpong ✔️Reacted by Buzz Zhang, Wnbot, Mohamed Amine LEGHERABA, Sandro and Yahor Siarheyenkaand not a moment too soon.
Warning: Python 2 will be retired on 1st January 2020: https://pythonclock.org/
Reacted by Saran Tanpituckpong ✔️, Xinyu Chen and Yahor SiarheyenkaReacted by 翎栋, Wnbot, Jordan Koncz, Magnus Boman, Paul Arizpe, Saran Tanpituckpong ✔️ and Yahor SiarheyenkaTime to shed Python 2 by UK The National Cyber Security Centre
Reacted by Starbeamrainbowlabs, Stephen Rauch, My1, Devin Buhl, ikwyl6, ucodelukas and Yahor Siarheyenkakill py2
Reacted by Yahor Siarheyenka, timmfroehlich, blitzher, newtoncy, joshua-fogg-klarna, pblop, Teodor Talov, Lukas Boehme, TheOverpassArsonist, evelyn and 2 more- added a commit that references this issue
on Mar 20, 2024 2024, still here.
Reacted by Paul BransfordThe
node.jsOpenJS Foundation has explicitly chosen other priorities over this. Please voice you complaint to them.
https://projects.propublica.org/nonprofits/organizations/471491876/202313179349304446/fullA notable alternative is to use Go code rather than Python. Go dramatically reduces the need for native C/C++ code in the first place. And Go has builtin support for FFI via cgo.
Don't use interpreted programming languages that blow up in production on variable name typos at runtime in 2024.
- added a commit that references this issue
on Sep 8, 2025
Please add support for Python 3.
Some tools require Python 2, some require Python 3, and this makes it really hard to setup a build environment. Better to support both when possible.