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.

classification
Title: Visual C++ Runtime Library Error is there a fix?
Type: crash Stage:
Components: IDLE, Windows Versions: Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Python installed from MSI doesn't work
View: 11288
Assigned To: Nosy List: Gösta.Huldt, Hydro56, Karen.KarenL, amaury.forgeotdarc, roger.serwy
Priority: normal Keywords:

Created on 2010-09-18 01:54 by Hydro56, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (10)
msg116746 - (view) Author: Dylon (Hydro56) Date: 2010-09-18 01:54
I attempt to run the program (IDLE) after a fresh install of Python x86 on windows 7 32-bit and it gives me this error:
"Runtime Error!

Program: C:\Program Files\Python\pythonw.exe


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information."
msg117181 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-09-23 11:35
Can you try to open a Command Prompt and type (with the quotes):
    "C:\Program Files\Python\python.exe" "C:\Program Files\Python\Lib\idle\idle.py" 
Do you see error messages?
msg117386 - (view) Author: Gösta Huldt (Gösta.Huldt) Date: 2010-09-25 19:08
I get the same error, but only when IDLE is run with the -n flag. 
In my case, the error occurs when attempting to switch back to the IDLE gui after executing a script that opens a graphics window (using the vtk module). This is with Python 2.6. 

I have Visual C++ 2010 Express installed, along with a previous install of the 2008 redistributable.

The following message is returned to the prompt:

Fatal Python error: PyEval_RestoreThread: NULL tstate

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
msg165802 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2012-07-18 21:12
Is this still a problem? My guess is that this issue is out of date.
msg167573 - (view) Author: Karen KarenL (Karen.KarenL) Date: 2012-08-06 19:53
I just run into this problem. I am running python 3.2, but I do have python 26 and python 27 install on the same computer.
msg167576 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2012-08-06 20:19
What are the precise steps you are taking to cause this error?

What version of Windows are you using? Is it 32-bit?
msg167581 - (view) Author: Karen KarenL (Karen.KarenL) Date: 2012-08-06 21:09
Additional info on error in python 3.2
I am using 32 bit Win 7 enterprise SP1. I download and installed python-3.2.msi from python.org I than start python pythonw from window menu just like any other program. Running python command line also failed, and this is the error message:
Fatal Python error: Py_Initialize: unable to load the file system codec
LookupError: no codec search functions registered: can't find encoding

This application has requested the runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

I have uninstalled python 26, 27, 32. Then reinstalled 32. Problem is still presents. I also have cygwin on my system. Python 26 and 27 worked without any issue. Python 26 that comes with cywin worked as well. I just updated my cygwin to get python 3.2 binaries from cygwin's dist. It is working.
Let me know if there is anything I can do to help.

Karen
msg167600 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2012-08-07 03:27
Karen, thank you for your reply and your cooperation. This issue may 
take some time to resolve.

It looks like the error you are receiving has been addressed in 
issue11288. Can you check it out?
msg167641 - (view) Author: Karen KarenL (Karen.KarenL) Date: 2012-08-07 21:19
Yes. It is the same bug. And changing pythonhome path from c:\python26 to
c:\python32 fixes the problem. My initial google search found bug 9890, but
not 11288. Let me know if there is anything I can do.

Karen

On Mon, Aug 6, 2012 at 8:27 PM, Roger Serwy <report@bugs.python.org> wrote:

>
> Roger Serwy added the comment:
>
> Karen, thank you for your reply and your cooperation. This issue may
> take some time to resolve.
>
> It looks like the error you are receiving has been addressed in
> issue11288. Can you check it out?
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue9890>
> _______________________________________
>
msg173650 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2012-10-24 00:36
I'm closing this issue as a duplicate of #11288.
History
Date User Action Args
2022-04-11 14:57:06adminsetgithub: 54099
2012-10-24 00:36:25roger.serwysetstatus: open -> closed
superseder: Python installed from MSI doesn't work
resolution: duplicate
messages: + msg173650
2012-08-07 21:19:57Karen.KarenLsetmessages: + msg167641
2012-08-07 03:27:25roger.serwysetmessages: + msg167600
2012-08-06 21:09:24Karen.KarenLsetmessages: + msg167581
2012-08-06 20:19:25roger.serwysetmessages: + msg167576
2012-08-06 19:53:25Karen.KarenLsetstatus: pending -> open
nosy: + Karen.KarenL
messages: + msg167573

2012-07-18 21:12:31roger.serwysetstatus: open -> pending
nosy: + roger.serwy
messages: + msg165802

2010-09-25 19:08:20Gösta.Huldtsetnosy: + Gösta.Huldt

messages: + msg117386
versions: + Python 2.6, - Python 3.1
2010-09-23 11:36:00amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg117181
2010-09-18 01:54:34Hydro56create