You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows installer created with Python X.Y does not work with Python X.Y+1 #49168
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/tarekziade'closed_at=<Date2015-09-25.03:15:07.725>created_at=<Date2009-01-12.05:28:22.051>labels= ['type-bug', 'library', 'OS-windows']
title='Windows installer created with Python X.Y does not work with Python X.Y+1'updated_at=<Date2015-09-25.03:15:07.716>user='https://bugs.python.org/rantanen'
Create Windows installer with Python 2.5 from attached project.
Install it with Python 2.6.1.
The post-installer will fail with error message:
*** run_installscript: internal error 0xFFFFFFFF ***
The code causing this is:
importsocket
and the actual error is:
ImportError
DLL load failed: The specified module could not be found.
File "<string>", line 6, in windows_binary_install
File "c:\apps\python26\lib\socket.py", line 46, in <module>
import _socket
If the installer is created with Python 2.6.1, it works fine.
Not sure if there is much to be done here; I don’t know if it is a reasonable expectation that an installer created with 2.X still work with 2.X+1, and anyway only 2.7 could get a bugfix now.
changed the title [-]Windows installer created with Python 2.5 does not work with Python 2.6.1[/-][+]Windows installer created with Python 2.5 does not work with Python 2.6.1[/+]on Feb 19, 2012
loewis commented on Feb 19, 2012
loewismannequin
Mannequin
More actions
Installers "ought to" work for subsequent versions if they contain pure-Python packages (i.e. no extension modules). I agree that the issue is obsolete for 2.x, but it may still exist for 3.x.
changed the title [-]Windows installer created with Python 2.5 does not work with Python 2.6.1[/-][+]Windows installer created with Python X.Y does not work with Python X.Y+1[/+]on Feb 19, 2012
BreamoreBoy commented on Sep 24, 2015
BreamoreBoymannequin
Mannequin
More actions
Can this be closed as history with so many changes having been made to the installer for 3.5?
There haven't been any fundamental changes to bdist_wininst in years, and bdist_wheel has mostly replaced it nowadays.
I'm fairly certain this issue was fixed by Mark Hammond's fix for bpo-4566. Just to be certain, I updated the code to use print as a function and used 3.4 to build "Simple-Python 3.4.3.win-amd64.exe". I installed this to 3.5, and the post-install script ran successfully. So I'm re-tagging this issue for versions 2.7 and 3.2 and closing it as a duplicate.
In summary, Python built with VS 2008 needs an activation context for the CRT assembly, which is required to load msvcr90.dll. Normally this comes from the application executable, such as python.exe. But when Python is embedded, it may be the case that the application lacks the required activation context (e.g. a bdist_wininst installer created by Python 2.5). Mark Hammond's fix works around this problem by saving and reusing the activation context from when the Python DLL was loaded. This activation context is based on the DLL's resource #2 manifest, which includes the CRT assembly.
One remaining problem for embedding Python 2.7 is accessing msvcr90.dll via ctypes. But it's ctypes! Just dynamically create an activation context.
Activity
rantanen commentedon Jan 12, 2009
*** run_installscript: internal error 0xFFFFFFFF ***
The code causing this is:
and the actual error is:
ImportError
DLL load failed: The specified module could not be found.
File "<string>", line 6, in windows_binary_install
File "c:\apps\python26\lib\socket.py", line 46, in <module>
import _socket
If the installer is created with Python 2.6.1, it works fine.
The problem was noticed in the Robot Framework project and the issue can
be found from http://code.google.com/p/robotframework/issues/detail?id=196.
This problem was first asked as part of issue
http://bugs.python.org/issue4566, but Martin v. Löwis recommended to
open new issue for this.
loewis commentedon Jan 12, 2009
Was the 2.6 installation "for all users", or "just for me"? What Windows
version are you using?
rantanen commentedon Jan 12, 2009
Python 2.6.1 was installed with option all users. I have admin rights
and the Windows version is:
XP Professional
Version 2002
Service Pack 3
merwok commentedon Feb 19, 2012
Not sure if there is much to be done here; I don’t know if it is a reasonable expectation that an installer created with 2.X still work with 2.X+1, and anyway only 2.7 could get a bugfix now.
[-]Windows installer created with Python 2.5 does not work with Python 2.6.1[/-][+]Windows installer created with Python 2.5 does not work with Python 2.6.1[/+]loewis commentedon Feb 19, 2012
Installers "ought to" work for subsequent versions if they contain pure-Python packages (i.e. no extension modules). I agree that the issue is obsolete for 2.x, but it may still exist for 3.x.
merwok commentedon Feb 19, 2012
Thanks, keeping it open. If I manage to get a VM set up I will see if this is reproducible.
[-]Windows installer created with Python 2.5 does not work with Python 2.6.1[/-][+]Windows installer created with Python X.Y does not work with Python X.Y+1[/+]BreamoreBoy commentedon Sep 24, 2015
Can this be closed as history with so many changes having been made to the installer for 3.5?
eryksun commentedon Sep 25, 2015
There haven't been any fundamental changes to bdist_wininst in years, and bdist_wheel has mostly replaced it nowadays.
I'm fairly certain this issue was fixed by Mark Hammond's fix for bpo-4566. Just to be certain, I updated the code to use print as a function and used 3.4 to build "Simple-Python 3.4.3.win-amd64.exe". I installed this to 3.5, and the post-install script ran successfully. So I'm re-tagging this issue for versions 2.7 and 3.2 and closing it as a duplicate.
In summary, Python built with VS 2008 needs an activation context for the CRT assembly, which is required to load msvcr90.dll. Normally this comes from the application executable, such as python.exe. But when Python is embedded, it may be the case that the application lacks the required activation context (e.g. a bdist_wininst installer created by Python 2.5). Mark Hammond's fix works around this problem by saving and reusing the activation context from when the Python DLL was loaded. This activation context is based on the DLL's resource #2 manifest, which includes the CRT assembly.
One remaining problem for embedding Python 2.7 is accessing msvcr90.dll via ctypes. But it's ctypes! Just dynamically create an activation context.