Python importerror:dll load failed:%1 is not a valid WIN32 application.

Source: Internet
Author: User

Running Python code appears: Importerror:dll load failed:%1 is not a valid WIN32 application.

Workaround: Go to download the pywin32 that corresponds to the version of Python you have installed and install

Download Link: https://sourceforge.net/projects/pywin32/files/pywin32/

Import _win32sysloader Importerror:dll load failed:%1 is not a valid WIN32 should

The previous problem was to use the Pyinstaller method to package the Py application, error import _win32sysloader (PYWIN32) Importerror:dll load failed:%1 is not a valid WIN32 application.

Solve:

1. Uninstall the 32-bit pywin32 First, uninstall if there is a problem, you can refer to:

Python question--cannot uninstall ' Pywin32 '. It is a distutils installed project and thus we cannot accurately ...-as bright as you-blog Park

2. Download and install the 64-bit Pywin32

D:\Python27\Scripts\pip.exe Install PYWIN32-223-CP27-CP27M-WIN_AMD64.WHL

After successful installation, packaging again, such as the issue of encoding, the file name is converted to alphanumeric.

Ref: 67636949

Python importerror:dll load failed:%1 is not a valid WIN32 application.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.