Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot Open Python. Error 0xc000007b

I have recently been learning Python 3. I have had no problems on my netbook (32bit Windows 7) I with creating small simple programs. When I installed it on my netbook I had no problems, but now that I've been getting into it I want to install it on my desktop and I have one. My desktop is a 64 bit OS running Windows 7. Like I did with my netbook, I went to download Python and install the 64 bit edition.

After installing it, I went to open up Python CLI and GUI and no luck. It gave me this error.

"The application was unable to start correctly (0xc000007b). Click OK to close the application"

I also tried reinstalling, but not luck.

I suspect a missing .dll but I am not completely sure. Does anyone know what is keeping me from opening Python and how do I fix it?. I want to resume my work as soon as possible.

like image 942
user3113898 Avatar asked Dec 18 '13 05:12

user3113898


People also ask

What causes 0xc00007b error?

Reasons of Windows error code 0xc000007b The error code means an invalid image format. Specifically, you are attempting to start an application which is designed to run on 64-bit operating system. But your computer is running 32-bit Windows.

How do I fix error 0xc000007b on Windows 8?

Microsoft Visual C++ Redistributable Package is a runtime component necessary for running of multiple applications. The files in Microsoft Visual C++ Redistributable Package usually corrupt due to many reasons. And this can cause the 0xc000007b error. In this case you need to reinstall this components.


3 Answers

That is the NTSTATUS error code for STATUS_INVALID_IMAGE_FORMAT. Almost invariably that means that the loaded is attempting to link a 32 bit DLL into a 64 bit process, or vice versa.

If you want to attempt to debug this then the tool of choice is Dependency Walker. You open the python.exe executable file in Dependency Walker and use the profile menu to start it up with logging of the load events. Somewhere along the way there will be a failure and you'll be able to see which module is causing that failure. That will hopefully point the way towards a resolution.

However, attempting to debug this may be a waste of time. It will probably better to uninstall the existing installation, and try to re-install. Perhaps picking a different Python distribution.

I note that you have selected a 64 bit version. Now, support for 64 bit extension modules is not as strong on 64 bit Python as on 32 bit Python. It does exist, but they modules can be harder to come by and install. You might consider installing a 32 bit Python next time round.

like image 94
David Heffernan Avatar answered Oct 13 '22 17:10

David Heffernan


Please make sure that Python3.dll is the same version and the same architecture (32/64) with python.exe. I fixed this error via replacing it with 32bit version.

like image 6
Kuddusi Çiftçibaşı Avatar answered Oct 13 '22 17:10

Kuddusi Çiftçibaşı


you should delete the old path of python in "Environment Variables" and enjoy ;)

like image 3
Mohammad Amin Eskandari Avatar answered Oct 13 '22 19:10

Mohammad Amin Eskandari