felixrieseberg / windows-build-tools

:package: Install C++ Build Tools for Windows using npm
MIT License
3.4k stars 237 forks source link

Python 2.7 #206

Open Kadantte opened 4 years ago

Kadantte commented 4 years ago

Why the tool still Install python 2.7 when it needs to install 3.8?

PS C:\Windows\system32> npm install --global windows-build-tools

> windows-build-tools@5.2.2 postinstall C:\Users\Candyseul\AppData\Roaming\npm\node_modules\windows-build-tools
> node ./dist/index.js

Downloading python-2.7.15.amd64.msi
[============================================>] 100.0% of 20.25 MB (1.12 MB/s)
Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\Candyseul\.windows-build-tools\python-2.7.15.amd64.msi.
Downloading vs_BuildTools.exe
[============================================>] 100.0% of 1.12 MB (746.57 kB/s)
Downloaded vs_BuildTools.exe. Saved to C:\Users\Candyseul\.windows-build-tools\vs_BuildTools.exe.

Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!

Status from the installers:
---------- Visual Studio Build Tools ----------
Successfully installed Visual Studio Build Tools.
------------------- Python --------------------

Now configuring the Visual Studio Build Tools and Python...

All done!

+ windows-build-tools@5.2.2
added 145 packages from 99 contributors in 232.448s
MFunction96 commented 4 years ago

I met the same issue, too. I can not install windows-build-tools with Python 3.8. In addition, I tried to install windows-build-tools by offline installation manually. But there is no python-3.8.1.amd64.msi or python-3.8.1.msi provided by Python official website.

basickarl commented 4 years ago

Our Azure CI is blowing up due to this. Trying to install version 5.2.2 but the following happens:

> windows-build-tools@5.2.2 postinstall C:\npm\prefix\node_modules\windows-build-tools
> node ./dist/index.js

Downloading python-2.7.15.amd64.msi
[>                                            ] 0.0% (0 B/s)

20 000 logs later:

Successfully installed Python 2.7Terminate batch job (Y/N)? 
##[error]The operation was canceled.
Finishing: Install

Eventually the CI timeout hits and kasplat.

jacobq commented 4 years ago

Why the tool still Install python 2.7 when it needs to install 3.8?

All but the latest versions of node lack support for Python 3, if I am not mistaken. Also, there hasn't been a release of this module published since the change to use Python 3 landed in master.

Regarding the problem, is it that the download finishes, but the process gets stuck after installation?

Kadantte commented 4 years ago

@jacobq For me, it installs everything fine but for now I want it to install python 3 instead of python 2 but since you make it clear it's okay.

joginds4 commented 4 years ago

Python 2 has already sunset on Jan 1, 2020. Please refer https://www.python.org/doc/sunset-python-2/ so when can we get windows-build-tools with Python 3.x?

GeorgesBat commented 4 years ago

Python 2 has already sunset on Jan 1, 2020. Please refer https://www.python.org/doc/sunset-python-2/ so when can we get windows-build-tools with Python 3.x?

I second this I still cant get windows build tools because I need Python 3.7

cclauss commented 4 years ago

@felixrieseberg Please make a release with the current code. Legacy Python is dead so this tool needs to stop installing it.

yongruning commented 4 years ago

Excuse me,i want to get python3,8 from this tool,what should i do?

cclauss commented 4 years ago

~Follow the Offline Installation instructions but change all instances of 3.8.1 to 3.8.2.~

yongruning commented 4 years ago

After using this tool,I removed python2.7 from the Windows path,Then installed python3.8 locally and configured it to Windows path,Successfully used

cclauss commented 4 years ago

Sure. These days you can always install the latest Python from the Microsoft Windows Store. The advantages of that approach is that you do not need to configure and it will be easy to upgrade as new versions of CPython are released. Python 3.8.3 is scheduled to released next month.

yongruning commented 4 years ago

It would be better if I could choose the python version on windows-build-tools. Like vs, I have been struggling with environment setup for a long time,I am a beginner,Because the company has a technical need

Cobertos commented 4 years ago

Follow the Offline Installation instructions but change all instances of 3.8.1 to 3.8.2.

This does not seem to work for me:

PS C:\WINDOWS\system32> npm install --global windows-build-tools --offline-installers="C:\Users\cobertos\Downloads"
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

> windows-build-tools@5.2.2 postinstall C:\Program Files\nodejs\node_modules\windows-build-tools
> node ./dist/index.js

Offline installation: Offline path C:\Users\cobertos\Downloads was passed, but we could not find python-2.7.15.amd64.msi in that path. Aborting installation now.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! windows-build-tools@5.2.2 postinstall: `node ./dist/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the windows-build-tools@5.2.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\cobertos\AppData\Roaming\npm-cache\_logs\2020-04-10T12_09_50_586Z-debug.log
Cobertos commented 4 years ago

Ended up just doing the manual installation as specified in node-gyp https://github.com/nodejs/node-gyp#option-2

Zireael commented 4 years ago

April 2020 Why this still tries to install Python 2.7?

Kadantte commented 4 years ago

Well, It's been a long time...

aminya commented 4 years ago

The package needs registration. #223 will probably solve this!

abdulraheem9909 commented 3 years ago

image

abdulraheem9909 commented 3 years ago

I am having issue while installing windows-build-tool

cclauss commented 3 years ago

Python 2 died 12 months ago on 1/1/2020.

The best path forward is to download the current Python v3.9.1 from the Microsoft App Store. https://www.microsoft.com/en-us/p/python-39/9p7qfqmjrfp7

cizario commented 3 years ago

January 2021, i already have python 3.7.3 installed for django projects and other stuffs, but when i installed windows-build-tools i got python 2.7.15 installed ! that's really disappointed me since 2.x branch was officially out of support. it would be really appreciated if the package during installation process detect if python is already installed, if not it just gives you the ability to provide the path to python installation so we can avoid any conflict between python installations.

jacobq commented 3 years ago

it would be really appreciated if the package during installation detect if python is already installed if not it just gives you the ability to provide the path to python installation so we avoid any conflict between python installations

Thank you for the suggestion. That sounds like a good improvement. I am sorry for your frustration and admit that this project has been neglected for some time now. Perhaps in the future I will be able to lend a hand again but for now others will need to step up (PRs welcome).

cclauss commented 3 years ago

The code on master is already Python 3 so we do not need PRs but instead we need a release of the current master. https://github.com/felixrieseberg/windows-build-tools/releases

jacobq commented 3 years ago

I don't think the current code detects what is already installed though.

Unfortunately I do not have the npm credentials to make an official release. I could, however, make a scoped one for people to use in the mean time.

-Jacob

On Sat, Jan 23, 2021, 11:00 AM Christian Clauss notifications@github.com wrote:

The code on master is already Python 3 so we do not need PR but instead we need a release of the current master. https://github.com/felixrieseberg/windows-build-tools/releases

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/felixrieseberg/windows-build-tools/issues/206#issuecomment-766141310, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMOZM7VM4DOFUEND7TVZU3S3L6ETANCNFSM4KOVF3BA .

cclauss commented 3 years ago

Scoped is better than nothing.

Kadantte commented 3 years ago

@jacobq any news about your scoped version?

jacobq commented 3 years ago

@jacobq any news about your scoped version?

No, sorry. I haven't forgotten but neither have I carved out time to work on this yet. Thanks for the nudge. Those willing to help clean-up or review, please react to this comment with 👀 . Those willing to help test, please react to this comment with 🚀 . Once I get started I think that'd be helpful for getting it over the finish line.

Kadantte commented 3 years ago

I get everything working after I did it manually :/ but no harm if everything is automated xD