This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Is python-3-5-0.exe compiled with SSE2 instrutions? If so should we mention this?
Type: Stage: resolved
Components: Build, Distutils, Windows Versions: Python 3.8
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steve.dower Nosy List: docs@python, dstufft, eric.araujo, eryksun, lac, malin, paul.moore, python-dev, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: 3.5regression

Created on 2015-10-10 10:43 by lac, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12438 merged malin, 2019-03-19 14:21
Messages (16)
msg252703 - (view) Author: Laura Creighton (lac) Date: 2015-10-10 10:43
Another report in to webmaster:
I tried to install Python 3.5.0 from [1]
3.5.0/python-3.5.0.exe but I get an error and I'm not able to install, is
this exe compiled with SSE2 instructions? Apparently no msi available

Does this need a mention somewhere?
msg252710 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2015-10-10 12:10
With Visual Studio 2010 and earlier, SSE support had to be explicitly enabled. Starting with VS2012 it's on by default [1]:

    Because the x86 compiler generates code that uses SSE2 
    instructions by default, you must specify /arch:IA32 to 
    disable generation of SSE and SSE2 instructions for x86 

For 3.5, the 32-bit build does use SSE2 instructions. For example, float_add uses the addsd instruction (opcode F2 0F 58):

    0:000> s python35!float_add l100 f2 0f 58
    71f6c5d8  f2 0f 58 44 24 08 8b 0d-84 11 18 72 f2 0f 11 44  ..XD$......r...D
    0:000> u 71f6c5d8 l3
    71f6c5d8 f20f58442408    addsd   xmm0,mmword ptr [esp+8]
    71f6c5de 8b0d84111872    mov     ecx,dword ptr [python35!free_list (72181184)]
    71f6c5e4 f20f11442410    movsd   mmword ptr [esp+10h],xmm0

Thus 3.5 doesn't support older CPUs that lack SSE2, such as the AMD Athlon XP. I didn't check the installer itself, but that would be a pointless exercise.

msg252712 - (view) Author: Laura Creighton (lac) Date: 2015-10-10 12:42
Okay then, wherever we put the -- Beginning with 3.5 we are not
supporting 3.5 we need to also tell people whose CPUs lack SSE2
that they are out of luck, as well.
msg252714 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-10-10 14:03
Did that report come with any reason for SSE to be relevant, such as an error message or log file?

Windows requires SSE these days, since Vista IIRC, so the problem is probably someone on XP.
msg252729 - (view) Author: Laura Creighton (lac) Date: 2015-10-10 17:06
Further conversation has confirmed that the person is on XP.
msg252730 - (view) Author: Laura Creighton (lac) Date: 2015-10-10 17:08
He says that he got an error saying something was compiled SSE2 and needed to be SSE, but if we are going to detect XP then that will be
a better error message.
msg252741 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2015-10-10 19:29
> Windows requires SSE these days, since Vista IIRC, so the problem 
> is probably someone on XP.

Windows 8 is the first to require SSE2 [1][2]. I'm sure it's no coincidence that this became the default in VS 2012. 

There is probably a small minority of users that upgraded to 32-bit Windows 7 on old hardware. Python 3.5 excludes them, but I don't think the build should switch to using /arch:IA32 just to support them. If a user on such a system really needs 3.5, it's possible to create a private build without SSE2. Most packages that have extension modules will also have to be built from source instead of using prebuilt wheels.

msg252742 - (view) Author: Laura Creighton (lac) Date: 2015-10-10 19:41
Ok, where do we put the info about how to create a private build?  And
who will write it?  (I lack the understanding.) Does it belong in:

or some place else?
msg252746 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2015-10-10 20:06
Building Python 3.5 requires Visual Studio 2015 and Windows 8.1, so this would be a vanishingly small audience that's building to deploy on old 32-bit Windows 7 machines. I don't think the PSF needs to worry about this. Anyway, the "/arch (x86)" docs [1] explain how to configure a project to use IA32, and PCBuild/readme.txt [2] explains how to build Python using Visual Studio 2015. I know this doesn't really help a novice user; just tell them to install Python 3.4!

msg252747 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2015-10-10 20:08
Sorry, I forgot to include the link to readme.txt:

msg252806 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-10-11 14:20
Since we officially support platforms that don't require SSE, I'll disable those instructions for 3.5.1.

As eryksun points out, this doesn't affect 64-bit builds, which are the standard for most performance critical uses anyway.
msg252822 - (view) Author: Laura Creighton (lac) Date: 2015-10-11 18:39
Another 2 bits of data:

I now know of 2 separate users from a Swedish teenager mailing list, whose machines (in each case 'my father's old laptop') didn't have SSE2.  One youth was running XP but spent today successfully migrating to windows 7 with help from her father.  The other was already running windows 7.

Neither of them had ever used Python before.  They are now running 
msg252826 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-10-11 22:16
New changeset 15f6bbe944fa by Steve Dower in branch '3.5':
Issue #25361: Disables use of SSE2 instructions in Windows 32-bit build

New changeset 3cf8c2930373 by Steve Dower in branch 'default':
Issue #25361: Disables use of SSE2 instructions in Windows 32-bit build
msg338359 - (view) Author: Ma Lin (malin) * Date: 2019-03-19 14:22
It seems SSE2 can be re-enabled for 3.8 branch.

> Starting with the March 2018 Windows 7 updates,
> security patches will only install on SSE2 or higher
> computing devices. This change only affects a small #
> of users on 15-20 year old legacy PCs.
msg340094 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-04-12 18:13
For 3.8 we support as far back as Win7 SP1 with the update for secure DLL loading, neither of which require SSE2. So we should hold this for 3.9 when we drop Win7 completely.
msg346452 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-06-24 23:43
New changeset 8bd2872adbbc7ed5dd0a7593193c52431ae34c8d by Steve Dower (animalize) in branch 'master':
bpo-25361: Enable SSE2 instructions for Windows 32-bit build (GH-12438)
Date User Action Args
2022-04-11 14:58:22adminsetgithub: 69548
2019-06-24 23:43:29steve.dowersetmessages: + msg346452
2019-04-12 18:13:17steve.dowersetmessages: + msg340094
2019-03-19 14:24:43malinsetversions: + Python 3.8, - Python 3.6
2019-03-19 14:22:18malinsetnosy: + malin

messages: + msg338359
versions: - Python 3.5
2019-03-19 14:21:25malinsetpull_requests: + pull_request12393
2015-10-11 22:17:40steve.dowersetstatus: open -> closed
resolution: fixed
stage: resolved
2015-10-11 22:16:38python-devsetnosy: + python-dev
messages: + msg252826
2015-10-11 18:39:02lacsetmessages: + msg252822
2015-10-11 14:20:47steve.dowersetnosy: + eric.araujo, dstufft
messages: + msg252806

assignee: docs@python -> steve.dower
components: + Build, Distutils, - Documentation, Installation
keywords: + 3.5regression
2015-10-10 20:08:47eryksunsetmessages: + msg252747
2015-10-10 20:06:33eryksunsetmessages: + msg252746
2015-10-10 19:41:38lacsetmessages: + msg252742
2015-10-10 19:29:43eryksunsetmessages: + msg252741
2015-10-10 17:08:55lacsetmessages: + msg252730
2015-10-10 17:06:30lacsetmessages: + msg252729
2015-10-10 14:03:45steve.dowersetmessages: + msg252714
2015-10-10 12:42:34lacsetmessages: + msg252712
2015-10-10 12:10:17eryksunsetnosy: + eryksun
messages: + msg252710
2015-10-10 10:43:24laccreate