Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Python 3 #193

Closed
mcandre opened this issue Feb 12, 2013 · 56 comments

Comments

@mcandre
Copy link

@mcandre mcandre commented Feb 12, 2013

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.

@TooTallNate

This comment has been minimized.

Copy link
Contributor

@TooTallNate TooTallNate commented Feb 12, 2013

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

@CamiloMM

This comment has been minimized.

Copy link

@CamiloMM CamiloMM commented Jul 26, 2014

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?

@unbornchikken

This comment has been minimized.

Copy link

@unbornchikken unbornchikken commented Aug 14, 2014

I've started a petition, you can sign it there: https://www.change.org/petitions/google-inc-upgrade-gyp-to-support-phyton-3

@mcandre

This comment has been minimized.

Copy link
Author

@mcandre mcandre commented Aug 14, 2014

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

@CamiloMM

This comment has been minimized.

Copy link

@CamiloMM CamiloMM commented Aug 14, 2014

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

@unbornchikken

This comment has been minimized.

Copy link

@unbornchikken unbornchikken commented Aug 15, 2014

typo fixed. never start a petition after midnight.

meme idea: i do petitions instead of PRs 😊

@TooTallNate

This comment has been minimized.

Copy link
Contributor

@TooTallNate TooTallNate commented Aug 15, 2014

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 😄

@unbornchikken

This comment has been minimized.

Copy link

@unbornchikken unbornchikken commented Aug 15, 2014

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.

@unbornchikken

This comment has been minimized.

Copy link

@unbornchikken unbornchikken commented Aug 15, 2014

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

@CamiloMM

This comment has been minimized.

Copy link

@CamiloMM CamiloMM commented Aug 15, 2014

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

@unbornchikken

This comment has been minimized.

Copy link

@unbornchikken unbornchikken commented May 4, 2015

coz da petition didnt help: https://github.com/unbornchikken/cmake-js

@untitaker

This comment has been minimized.

Copy link

@untitaker untitaker commented Jul 16, 2015

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.

@demurgos

This comment has been minimized.

Copy link

@demurgos demurgos commented Nov 29, 2015

Looks like they are working on it.

https://codereview.chromium.org/1454433002

@bendavis78

This comment has been minimized.

Copy link
Contributor

@bendavis78 bendavis78 commented May 9, 2016

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

@bnoordhuis

This comment has been minimized.

Copy link
Member

@bnoordhuis bnoordhuis commented May 9, 2016

@bendavis78 It does, it looks for python2 first before falling back to python. On Windows, it also looks in well-known locations and consults the python launcher when available.

@mikemaccana

This comment has been minimized.

Copy link

@mikemaccana mikemaccana commented May 21, 2016

This just hit me too trying node on Windows for the first time (first time on Windows that is, have been using node since 0.6).

npm install node-gyp asked for Python, I installed the current version of Python. Then it complains about python 3.

@stochastic-thread

This comment has been minimized.

Copy link

@stochastic-thread stochastic-thread commented Apr 23, 2017

this is so annoying

@refack

This comment has been minimized.

Copy link
Member

@refack refack commented Apr 23, 2017

You're all missing the point 😉
The real goal is to remove the dependency on python completely #960

@CamiloMM

This comment has been minimized.

Copy link

@CamiloMM CamiloMM commented Apr 23, 2017

@maxkoryukov

This comment has been minimized.

Copy link

@maxkoryukov maxkoryukov commented Apr 23, 2017

@refack, we all missing the point? Lets look at things globally: #960 is about coding for tiny PYTHON interpreter in JAVASCRIPT ;)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░▄▄███▄▄▄░▄▄██▄░░░░░░░
░░░░░░░░░██▀███████████████▀▀▄█░░░░░░
░░░░░░░░█▀▄▀▀▄██████████████▄░░█░░░░░
░░░░░░░█▀▀░▄██████████████▄█▀░░▀▄░░░░
░░░░░▄▀░░░▀▀▄████████████████▄░░░█░░░
░░░░░▀░░░░▄███▀░░███▄████░████░░░░▀▄░
░░░▄▀░░░░▄████░░▀▀░▀░░░░░░██░▀▄░░░░▀▄
░▄▀░░░░░▄▀▀██▀░░░░░▄░░▀▄░░██░░░▀▄░░░░
█░░░░░█▀░░░██▄░░░░░▀▀█▀░░░█░░░░░░█░░░
█░░░▄▀░░░░░░██░░░░░▀██▀░░█▀▄░░░░░░▀▀▀
▀▀▀▀░▄▄▄▄▄▄▀▀░█░░░░░░░░░▄█░░█▀▀▀▀▀█░░
░░░░█░░░▀▀░░░░░░▀▄░░░▄▄██░░░█░░░░░▀▄░
░░░░█░░░░░░░░░░░░█▄▀▀▀▀▀█░░░█░░░░░░█░
░░░░▀░░░░░░░░░░░░░▀░░░░▀░░░░▀░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

Of course, Node.JS is not the same as javascript.


Hmm, sign the petition is not a bad idea though))

@reebr

This comment has been minimized.

Copy link

@reebr reebr commented Nov 9, 2018

Still using Python 2?

@virgo47

This comment has been minimized.

Copy link

@virgo47 virgo47 commented Nov 28, 2018

When I unknowingly upgrade Node LTS, going from 8 to 10, and my node-sass binding is unusable (again) and I want to rebuild node-sass and get to the message that Python at some/existing/path/to/python.exe doesn't exist (with "gyp:" line prefix)... which leads me here... I kinda lost the hope for node/npm ecosystem. How many languages and platforms do I actually need to build an Angular application? (Sure, I should watch my versions, but still...)

@techdragon

This comment has been minimized.

Copy link

@techdragon techdragon commented Dec 12, 2018

Hey so now that GYP is fixed. - https://bugs.chromium.org/p/gyp/issues/detail?id=36
When do we get this re-opened and fixed properly? @TooTallNate - (tagging you because you were the one that closed this originally.)

@AlexandraBryantKS

This comment has been minimized.

Copy link

@AlexandraBryantKS AlexandraBryantKS commented Dec 14, 2018

If we want to keep up with the future (not just updated python) should we just abandon node-gyp in favor of the suggestions from @bricss?

@rvagg

This comment has been minimized.

Copy link
Member

@rvagg rvagg commented Dec 18, 2018

Related nodejs/build#1631 (comment) (general thoughts on python 2/3 pain).

For addon authors, CMake isn't a terrible idea, you should consider it at least. The way node-gyp is integrated into Node makes it convenient for fetching various variables about the build being compiled against, but this isn't strictly essential and if you can achieve it with a better supported tool then that might be a good idea.

At the moment we just don't have a good strategy for the future of GYP and our reliance on it. Maybe that'll come one day, but it's going to need some folks to propose and push something new.

@wind13

This comment has been minimized.

Copy link

@wind13 wind13 commented Jan 6, 2019

It's 2019, still Python 2. 😕

@stochastic-thread

This comment has been minimized.

Copy link

@stochastic-thread stochastic-thread commented Jan 30, 2019

some say they'll never update

@zoobot zoobot referenced this issue Feb 4, 2019
@ashb

This comment has been minimized.

Copy link

@ashb ashb commented Mar 4, 2019

@mcandre

This comment has been minimized.

Copy link
Author

@mcandre mcandre commented Mar 12, 2019

With the rise of WASM do we really need to support native libraries in Node projects any longer

@JamesMGreene

This comment has been minimized.

Copy link

@JamesMGreene JamesMGreene commented Mar 12, 2019

@mcandre I'm no WAsm expert but, as I understand it, WebAssembly modules are sandboxed in a way that many existing native modules could not function within. 🔒

Furthermore, there is a large collection of existing native modules that would either need to be converted or else cease to be officially supported. 😬

@VergLsm

This comment has been minimized.

Copy link

@VergLsm VergLsm commented May 19, 2019

It's 2019-5-19, still Python 2.

@osljw

This comment has been minimized.

Copy link

@osljw osljw commented May 24, 2019

Wow, It's been six years.

@ORESoftware

This comment has been minimized.

Copy link

@ORESoftware ORESoftware commented May 24, 2019

Why not just ditch Python? Python sucks anyway. Let us ditch Python 2 and Python 3.

@shirshak55

This comment has been minimized.

Copy link

@shirshak55 shirshak55 commented Jun 7, 2019

haha :( 😂 😆

People still use python2... :( python2 should have been removed from universe earlier so we don't have to face this problem :/

@devinbost

This comment has been minimized.

Copy link

@devinbost devinbost commented Jun 12, 2019

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!

@filips123

This comment has been minimized.

Copy link

@filips123 filips123 commented Jun 12, 2019

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

@kumarharsh

This comment has been minimized.

Copy link

@kumarharsh kumarharsh commented Jul 11, 2019

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

@alexdevero

This comment has been minimized.

Copy link

@alexdevero alexdevero commented Jul 11, 2019

@kumarharsh Now way 🤞!

@cclauss

This comment has been minimized.

Copy link
Contributor

@cclauss cclauss commented Jul 11, 2019

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.

@shirshak55

This comment has been minimized.

Copy link

@shirshak55 shirshak55 commented Jul 11, 2019

Finally after 6 years :)

@sbrl

This comment has been minimized.

Copy link

@sbrl sbrl commented Jul 16, 2019

and not a moment too soon.

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

@gluons

This comment has been minimized.

Copy link

@gluons gluons commented Sep 9, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.