Skip to content

Support for Python 3 #193

Description

@mcandre

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.

Activity

  1. TooTallNate commented on Feb 12, 2013

    @TooTallNate
    Contributor

    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!).

  2. CamiloMM commented on Jul 26, 2014

    @CamiloMM

    As 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?

  3. unbornchikken commented on Aug 14, 2014

    @unbornchikken
  4. mcandre commented on Aug 14, 2014

    @mcandre
    Author

    @unbornchikken Er, you may want to correct a typo in the petition: "Phyton 3".

  5. CamiloMM commented on Aug 14, 2014

    @CamiloMM

    @unbornchikken Is everything a petition nowadays...? Nevermind, signed.
    watt-can-you-do-sign-the-petition

    @mcandre Well, that's because he's phyton for it.

  6. unbornchikken commented on Aug 15, 2014

    @unbornchikken

    typo fixed. never start a petition after midnight.

    meme idea: i do petitions instead of PRs 😊

  7. TooTallNate commented on Aug 15, 2014

    @TooTallNate
    Contributor

    I appreciate the sentiment, but I believe Google is going to be focusing their time on gn these days. They have plans to phase out gyp before the end of 2014. I'm looking for some time/motivation to write node-gn 😄

  8. unbornchikken commented on Aug 15, 2014

    @unbornchikken

    hm, 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.

  9. unbornchikken commented on Aug 15, 2014

    @unbornchikken

    For motivation: start a repo, and put a Donate button in the readme. You will be suprised. ;)

  10. CamiloMM commented on Aug 15, 2014

    @CamiloMM

    @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).

  11. unbornchikken commented on May 4, 2015

    @unbornchikken
  12. untitaker commented on Jul 16, 2015

    @untitaker

    Please try to use env python2. The current version of node-gyp completely breaks on distributions that have their default Python binary set to Python 3.

  13. demurgos commented on Nov 29, 2015

    @demurgos

    Looks like they are working on it.

    https://codereview.chromium.org/1454433002

  14. bendavis78 commented on May 9, 2016

    @bendavis78
    Contributor

    Is there any reason why node-gyp can't autodetect the location of python2 and use that to run gyp?

  15. 34 remaining items

  16. devinbost commented on Jun 12, 2019

    @devinbost

    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!

  17. filips123 commented on Jun 12, 2019

    @filips123

    @devinbost Unfortunately, that tool only migrates some parts of the code. Some bigger breaking changes then still need to be fixed manually.

  18. kumarharsh commented on Jul 11, 2019

    @kumarharsh

    Hold your horses! It seems like something is afoot: 66ad305

  19. alexdevero commented on Jul 11, 2019

    @alexdevero

    @kumarharsh Now way 🤞!

  20. cclauss commented on Jul 11, 2019

    @cclauss
    Contributor

    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.

  21. shirshak55 commented on Jul 11, 2019

    @shirshak55

    Finally after 6 years :)

  22. sbrl commented on Jul 16, 2019

    @sbrl

    and not a moment too soon.

    Warning: Python 2 will be retired on 1st January 2020: https://pythonclock.org/

  23. gluons commented on Sep 9, 2019

    @gluons

    Time to shed Python 2 by UK The National Cyber Security Centre

  24. ucodelukas commented on Nov 8, 2020

    @ucodelukas

    kill py2

  25. zabiksandbox commented on Sep 13, 2024

    @zabiksandbox

    2024, still here.

  26. refack commented on Sep 13, 2024

    @refack
    Contributor

    The node.js OpenJS Foundation has explicitly chosen other priorities over this. Please voice you complaint to them.
    https://projects.propublica.org/nonprofits/organizations/471491876/202313179349304446/full

  27. mcandre commented on Sep 14, 2024

    @mcandre
    Author

    A 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.

  28. added a commit that references this issue on Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions