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

Failure to start #341

Closed
techtonik opened this issue Jun 1, 2016 · 31 comments
Closed

Failure to start #341

techtonik opened this issue Jun 1, 2016 · 31 comments

Comments

@techtonik
Copy link

untitled

Seems like some .dlls are missing from distribution. Namely:

api-ms-win-crt-runtime-l1-1-0.dll

This is the problem reported on another user behalf, so he has no chance to like troubleshoot it, because it is his first Python experience.

I'd prefer builds with https://mingwpy.github.io/

@stonebig
Copy link
Contributor

stonebig commented Jun 1, 2016

Isn't it that the user didn't install vs2015 runtime on his PC ?

If that one is missing because of Winpython, shouldn't there be 17 others also ?

crt_zoo

@techtonik
Copy link
Author

Most likely yes. But plain Python 3.5 doesn't require those to be installed on Windows, so why WinPython fails if those are not available?

@stonebig
Copy link
Contributor

stonebig commented Jun 2, 2016

Winpython may not work for everybody's PC or everybody's taste. Maybe your new user may have a better luck with anaconda or plain standard python.

@techtonik
Copy link
Author

Plain standard Python doesn't contain convenient editor, i.e. Spyder. Also, user experience in Windows command line is awful.

@stonebig
Copy link
Contributor

stonebig commented Jun 4, 2016

Coming back to this:

  • what your newcomer tried is not clear to me (launching Jupyter, then qtconsole, the IDLEX ?),
  • I always noticed the reliable way to trash any complex system is to click on all buttons at once,
  • on my old PC, Spyder always fails first time I try a new instalaltion of Winpython (probably because of a time out while windows populates its cache), so the same sort of thing can happen here.

@techtonik
Copy link
Author

Newcomer tried to bring Python to learn programming on Windows. He downloaded WinPython, because he thought that it is Python tailored specifically for Windows users. He tried to run everything, but nothing works.

@stonebig
Copy link
Contributor

stonebig commented Jun 5, 2016

so my guess is that he is on windows 7, and a WinPython3.4 without need of vs2015 will be a better fit.

for example WinPython-64bit-3.4.4.1Qt5.exe

otherwise install vs2015 redistribuable first (https://www.visualstudio.com/downloads/download-visual-studio-vs#d-visual-c)

@techtonik
Copy link
Author

Does official Python 3.5.x require this too?

@stonebig
Copy link
Contributor

stonebig commented Jun 5, 2016

You need vs2015 redistribuable if you are not on Windows 10 and :

  • you are WinPython 3.5.0+,
  • or you are WinPython 3.4.4.2+ and you want to use numba.

@techtonik
Copy link
Author

This does answer the question Does official Python 3.5.x require this too?, which boils down to..

Is WinPython 3.5.x binary compatible with Python 3.5.x extensions?

Because if Python 3.5.x uses different run-time, then it is not.

@stonebig
Copy link
Contributor

stonebig commented Jun 6, 2016

Python 3.5.x "official" is made with vs2015, and so needs vs2015 runtime on Windows 7/8/8.1, and WindowsServer2008/WindowsServer2012

@techtonik
Copy link
Author

But I don't remember any crashes after installation, so does official Python installer ship those bundled?

@stonebig
Copy link
Contributor

No.

@techtonik
Copy link
Author

python3 5 1-install-error-0x80240017

Official 32-bit installer fails to install. I am still waiting for an answer about which version of Windows is it, but I guess it is Windows 8.

@takluyver
Copy link

I believe that the Python.org installers do ensure by some means that the necessary C runtime is installed. I'm not sure if it's bundled or downloaded through Windows update as necessary or something else.

@techtonik
Copy link
Author

It is Windows 8.1 64-bit. The above screenshot with error 0x80240017 is from official python.org installer, so it looks like it doesn't bundle or download anything or even show descriptive error message.

@stonebig
Copy link
Contributor

you may ask to @zooba on twitter, or just install manually the vc0215 runtime and see if the error message disappears all of a sudden.

I hoped that Microsoft would have installed it automatically via a windows update for the rest of us not on #Windows10. I was apparently wrong.

@takluyver
Copy link

I googled the error code plus Python and found this issue: http://bugs.python.org/issue25157

It sounds like it's something to do with Windows update and the installation of the C runtime packages, but it's probably a system problem rather than a bug in the installer.

@takluyver
Copy link

Oh, and I also got this Windows support page, which suggests manually installing an update to resolve that error: https://support.microsoft.com/en-us/kb/2906956

@zooba
Copy link

zooba commented Jun 20, 2016

The official installer bundles (or downloads) the UCRT, which is not the full vcredist runtime, but it is enough for core CPython and C extension modules (but not C++).

WinPython probably wants to bundle or install the full vcredist, or at least make it trivially easy for users to get it. Alternatively, be very careful not to include extensions that use C++/OMP/etc..

@stonebig
Copy link
Contributor

stonebig commented Jun 20, 2016

To me, the compiler runtime (or the UCRT part ?) is an OS thing, starting vs2015.

@zooba
Copy link

zooba commented Jun 20, 2016

Sure, and all supported and updated OSs should have the correct CRT (but not C++ runtime) already. You'll just have to be prepared to explain the workaround to people who aren't willing to install updates :)

@techtonik
Copy link
Author

@takluyver so your bundled updates won't help? Do you have some "empty installer" for https://github.com/takluyver/pynsist/ with that run-time check so that I can forward the link to user to see if the fix for takluyver/pynsist#68 works for that specific error.

@techtonik
Copy link
Author

@zooba or people with malware that blocks or reverts those updates. =)

@stonebig
Copy link
Contributor

for the sanity of the winpython hotline, failing to install on not-updated PCs is rather good news.

@zooba
Copy link

zooba commented Jun 20, 2016

@stonebig In that case, if LoadLibrary("ucrtbase.dll") fails, you know the machine isn't up to date. That's the easiest way to see whether the correct CRT is installed.

@stonebig
Copy link
Contributor

stonebig commented Jun 20, 2016

hum, to warn a user that he doesn't have the UCRT, Winpython may first succeed to start.

unless that thing is doable in vbscript ? (so I would put it under a few launcher icons)

@takluyver
Copy link

@techtonik If the official Python installers are failing to install the CRT, I highly doubt that Pynsist's hackish solution will work. I don't have empty installers, though I can provide one of the built examples if necessary, but:

  • It probably won't work.
  • Even if it did, I don't think it would provide much information about the problem or potential proper solutions.
  • It's probably best not to teach new users a habit of running exes from some random person's Dropbox public folder.

@zooba
Copy link

zooba commented Jun 20, 2016

@stonebig I compiled the official installer with the CRT statically linked to avoid that issue.

@techtonik
Copy link
Author

@zooba so, the correct logic for better user experience is not only to redirect (ideally download) users to required update, but also to check for update prerequisites, right?

https://support.microsoft.com/en-us/kb/2999226#bookmark-prerequisites

@zooba
Copy link

zooba commented Jun 20, 2016

It depends on the failure state. For the official installer, we would fail with an obscure error message if you don't have the prerequisites. That was because we were doing the install ourselves.

If you're simply linking to the full vcredist, then it should fail with a detailed message if the prereqs are missing. An annoying extra download before finding that out, but not necessarily the end of the world, depending on the expected user base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants