swcarpentry / windows-installer

Software Carpentry installer for Windows.
MIT License
21 stars 17 forks source link

Error: This version of %1 is not compatible with the version of Windows you’re running #49

Closed agt24 closed 5 years ago

agt24 commented 8 years ago

I’m teaching SWC later this week and one of the students just emailed me about a problem with the SWC Windows Installer from her Windows 8.1 laptop. I tried to run the v0.3 installer from my 32-bit Windows 7 VM and got the same error she was reporting: “ Unable to execute file […] This version of %1 is not compatible with the version of Windows you’re running.) (see attached for screenshot).

I saw some related discussions in other open Issues but I wasn’t clear on the resolution.

screenshot 2016-06-05 17 19 24
wking commented 8 years ago

On Mon, Jun 06, 2016 at 10:12:20AM -0700, Adam Thomas wrote:

I tried to run the v0.3 installer from my 32-bit Windows 7 VM…

We think the installer is currently 64-bit only 1. I'm not familiar with Inno Setup, but it would be nice to return a more useful error message in this case (or fix the installer to support 32-bit Windows).

Until then, you can open a terminal and run the Python script 2 from there. On some systems you can do this by double-clicking the Python file 3.

embray commented 8 years ago

Is there a specific piece of software bundled in the Windows installer that doesn't have a 32-bit version available?

In the meantime I agree on fixing the installer for a better message. I'll take care of that ASAP.

Also a little confused / surprised that there are 32-bit Windows 8 machines in the wild though I guess it's not unheard of?

wking commented 8 years ago

On Mon, Jun 06, 2016 at 11:05:46AM -0700, Erik Bray wrote:

Is there a specific piece of software bundled in the Windows installer that doesn't have a 32-bit version available?

I haven't double-checked, but as long as Windows doesn't cut a 64-bit-only kernel, I think we want to be installing 32-bit versions (which would work on both 32-bit-only and 32/64-both kernels).

agt24 commented 8 years ago

Thanks for the quick reply, Trevor. I was able to successfully run the python script from the terminal. Let me be explicit about the steps I took for others who might encounter the same problem:

Note that I am using the 32-bit WIndows 7 VM that is available for download here: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/windows/

Perhaps we should change the workshop template to instruct new students to install from the command line until the installer can be fixed?

wking commented 8 years ago

On Mon, Jun 06, 2016 at 11:21:56AM -0700, Adam Thomas wrote:

Perhaps we should change the workshop template to instruct new students to install from the command line until the installer can be fixed?

We used to do that, but folks thought asking learners to install Git for Windows, download and locate the script, and run the script from the command line (or by double clicking? I don't remember how often that worked) was too complicated for folks who had yet to go through the shell lesson.

And the current Inno Setup executable works for most people ;).

agt24 commented 8 years ago

Good points. Maybe just have the error message point to the workaround instead.

embray commented 8 years ago

I haven't double-checked, but as long as Windows doesn't cut a 64-bit-only kernel, I think we want to be installing 32-bit versions (which would work on both 32-bit-only and 32/64-both kernels).

It depends. Do we really intend this to be just for workshops, or to also help people set up to do real work? If so they could easily run into memory limitations in 32-bit if they load up some scientific data (even if they have a 64-bit OS).

I think it would make more sense to have separate 32-bit and 64-bit installers. For some software (like git) 32-bit is fine on both. But for things like Python and R one would want to take full advantage of their address space ;)

embray commented 8 years ago

Good points. Maybe just have the error message point to the workaround instead.

I'll try to do that later today since that should be a quick fix. Having a working 32-bit installer would be good eventually too though. Anyone know where I can get some valid Windows VMs to test on?

embray commented 8 years ago

(Er, specially 32-bit--I have a 64-bit Windows machine)

agt24 commented 8 years ago

You can get them straight from Microsoft now. See the link I posted above: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/windows/

embray commented 8 years ago

After exploring this issue further I don't think it's straightforward to add a better error message. It seems to me the most likely issue here is the Python that is bundled with py2exe is 64-bit. If we just bundle a 32-bit Python it should be no issue for users on either platform.

The software installed by the swc-windows-installer is all 32-bit.

iamc commented 8 years ago

Yes @embray , I just built the installer with py2exe 32bit and no problem whatsoever in both Windows7 32 and 64bit. For WindowsXP (we have some learners with it in our incoming workshop) I had to rebuild it again in a WindowsXP machine as it didn't work.

embray commented 8 years ago

Thanks for confirming that @iamc.

I'm working on setting up an automated build system for the installer to make it a bit easier and more consistent to build and deploy. Will make sure it's using using 32-bit Python for the bundled Python.

agt24 commented 8 years ago

Thanks for the quick fixes on this. Happy to test again on my VM when you're ready.

jiffyclub commented 8 years ago

@agt24 When you ran the script from the command line was it Git Bash or the Anaconda-skinned Windows prompt? Asking because it looks in your screenshot like the Windows prompt.

wking commented 8 years ago

On Thu, Jun 30, 2016 at 10:18:42PM -0700, Matt Davis wrote:

@agt24 When you ran the script from the command line was it Git Bash or the Anaconda-skinned Windows prompt? Asking because it looks in your screenshot like the Windows prompt.

I'm not sure what @agt24 did, but the installer is expanding ~ to figure out where to put things. As long as that expansion points to the same directory as the $HOME you'll be using for future shell sessions (e.g. if you do a Bash or command-line-Git lesson), it shouldn't matter which shell invokes swc-windows-installer.py.

agt24 commented 8 years ago

You're correct, @jiffyclub. I did use the Anaconda prompt rather than git bash. Apologies for the error in the step-by-step description. I just repeated the steps from git bash and it seems to also work there, as @wking suggests.

embray commented 8 years ago

Ooh thanks @agt24 by the way to pointing out the link to those VMs. I somehow missed that before. This will be very helpful for testing purposes.

latagaw commented 7 years ago

i have intalled an android studio 2.3.3 and has a "Gradle project sync failed" error message.

Error:CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher

my OS is Windows 7 Ultimate - Service Pack 1 32-bit Operating system

How to resolve this problem? Thanks

PoojaShahapur commented 6 years ago

i getting this error in android studio 2.3.3 plz resolve it

Error:CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher

embray commented 6 years ago

@PoojaShahapur You are trying to run a 64-bit application on a 32-bit version of Windows.

taman123 commented 5 years ago

errror code 216 solution please

embray commented 5 years ago

This issue seems to attract people searching for the same error message in contexts that have nothing to do with this project, so I think it should be locked. For future reference: It presumably means (as I think is mostly clear) that you are running exclusively 64-bit software on a 32-bit version of Windows.