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

Install python 3 on images #15

Closed
vweevers opened this issue Apr 17, 2021 · 8 comments
Closed

Install python 3 on images #15

vweevers opened this issue Apr 17, 2021 · 8 comments
Labels
maintenance General maintenance pull request welcome A pull request is welcome

Comments

@vweevers
Copy link
Member

Required for latest node-gyp.

The centos7-devtoolset7 image has python 2, I didn't check the other images yet.

PRs welcome.

@reconbot
Copy link

reconbot commented Jan 2, 2022

Is there a workaround to install python 3? I'm having trouble building with python 2 and node 14

@reconbot
Copy link

reconbot commented Jan 2, 2022

alpine also has python2 - doesn't seem to let us install any packages eg -i alpine --preinstall 'apk add python3' doesn't work.

@vweevers
Copy link
Member Author

vweevers commented Jan 2, 2022

I'm guessing because that runs as the node user.

A PR to move to Python 3 would be most welcome.

@vweevers
Copy link
Member Author

vweevers commented Jan 2, 2022

(short of that, the only workaround is downgrading node-gyp)

@GazHank
Copy link
Contributor

GazHank commented Feb 5, 2022

hi @reconbot, I've proposed PR #22 to add python 3 to Centos and Alpine. Any testing or feedback would be welcome. Sorry I've not had chance to test this out properly yet (I'm away from my dev machines at the moment)

@reconbot
Copy link

reconbot commented Feb 7, 2022

How can I test it?

@GazHank
Copy link
Contributor

GazHank commented Feb 7, 2022

How can I test it?

I think the easiest way is using a custom image per https://github.com/prebuild/prebuildify-cross#usage but haven't had chance to try it yet

vweevers added a commit that referenced this issue Feb 27, 2022
As is required for latest `node-gyp`. Some images already had Python
3 installed, now alpine and centos7-devtoolset7 do too, additionally
with the `python` command linked to `python3`. Meaning `python -V`
will print a 3.x version number.

On centos7-devtoolset7, Python 2 remains installed because `yum`
relies on it. It can also be accessed as the `python2` command.
vweevers added a commit that referenced this issue Mar 4, 2022
As is required for latest `node-gyp`. Some images already had Python
3 installed, now alpine and centos7-devtoolset7 do too, additionally
with the `python` command linked to `python3`. Meaning `python -V`
will print a 3.x version number.

On centos7-devtoolset7, Python 2 remains installed because `yum`
relies on it. It can also be accessed as the `python2` command.
@vweevers
Copy link
Member Author

vweevers commented Mar 4, 2022

2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance General maintenance pull request welcome A pull request is welcome
Projects
None yet
Development

No branches or pull requests

3 participants