Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.(5)

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

ITtutoria

ITtutoria Logo ITtutoria Logo

ITtutoria Navigation

  • Python
  • Java
  • Reactjs
  • JavaScript
  • R
  • PySpark
  • MYSQL
  • Pandas
  • QA
  • C++
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA
Home/ Questions/How to avoid the error "importerror: dll load failed: %1 is not a valid win32 application"?
Next
Answered
Emma Roques
  • 9
Emma Roques
Asked: May 12, 20222022-05-12T11:47:17+00:00 2022-05-12T11:47:17+00:00In: python

How to avoid the error “importerror: dll load failed: %1 is not a valid win32 application”?

  • 9

. Advertisement .

..3..

. Advertisement .

..4..

Hi developer experts, I have a small but frustrating use case, and so far, I couldn’t get my head around this problem & ideal solution. I am running my command, and I am facing one problem with the importerror: dll load failed: %1 is not a valid win32 application. Below is the command I used:

Traceback (most recent call last):
File "C:\WorkSpace\Work\dev2qa.com-example-
code\PythonExampleProject\com\dev2qa\example\sqlite\SQLiteOperationExample.py", 
line 7, in <module>
import sqlite3
File "C:\Program Files (x86)\Python37-32\lib\sqlite3\__init__.py", line 23, in <module>

from sqlite3.dbapi2 import * File "C:\Program Files (x86)\Python37-32\lib\sqlite3\dbapi2.py", line 27, in <module> from _sqlite3 import *

When I run it, I get the following error:

ImportError: DLL load failed: %1 is not a valid Win32 application.

I am looking forward to gaining some knowledge from all experts. Thank you, guys!

dll load failed
  • 2 2 Answers
  • 87 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

2 Answers

  • Voted
  • Oldest
  • Recent
  • Random
  1. Best Answer
    lyytutoria Expert
    2022-06-01T01:03:26+00:00Added an answer on June 1, 2022 at 1:03 am

    The cause: This error happens because your eclipse Pydev project uses python interpreter is a 32-bit version, and your Windows OS is a 64-bit version.

    Solution: 

    Open a dos window and run the command python in it:

    C:\Users\zhaosong>python
    Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32
    Run the command set pro in the dos window, you can get your Windows OS bit version.
    >set pro
    PROCESSOR_ARCHITECTURE=AMD64
    
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
    
    PROCESSOR_LEVEL=6
    
    PROCESSOR_REVISION=3c03
    
    PROGRAMDATA=C:\ProgramData
    
    PROGRAMFILES=C:\Program Files
    
    PROGRAMFILES(X86)=C:\Program Files (x86)
    
    PROGRAMW6432=C:\Program Files
    PROMPT=(base) $P$G
    Remove the 32-bit python and set up another 64-bit python, then use the 64-bit version of python as your eclipse Pydev project’s python in order to fix this problem.

    How To Set 64-bit Python As Eclipse Pydev Project Used Python Interpreter.

    1. Open eclipse, click the Project —> Properties menu item on the top menu toolbar.
    2. Click the PyDev – Interpreter/Grammar item on the project Properties window left side.
    3. Click the link Click here to configure an interpreter not listed on the window right side, then it will prompt the How to config interpreter? dialog.
    4. Click the Open interpreter preferences page button, it will open the Preferences window.
    5. On the window right side, click the New button, then click the Browse for python/pypy exe item in the drop-down list.
    6. Browse to select the Python.exe file in my anaconda installed directory ( for example C:\Users\zhaosong\anaconda3 ).
    7. Give the python interpreter a name ( such as anaconda-python ).
    8. After you install the new python interpreter, you should select it for your eclipse Pydev project.
    9. You can read the article How To Change Python Interpreter In Eclipse Pydev Project To Use Different Python Virtual Environment Library to learn more.
    • 18
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. Inès Merlin
    2022-05-25T19:47:28+00:00Added an answer on May 25, 2022 at 7:47 pm

    Check that your Python version is 64-bit. This could be the problem. This would mean that you would have used 32-bit Python and installed 64-bit binaries for OpenCV.

    • 16
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question
  • How to Split String by space in C++
  • How To Convert A Pandas DataFrame Column To A List
  • How to Replace Multiple Characters in A String in Python?
  • How To Remove Special Characters From String Python

Explore

  • Home
  • Tutorial

Footer

ITtutoria

ITtutoria

This website is user friendly and will facilitate transferring knowledge. It would be useful for a self-initiated learning process.

@ ITTutoria Co Ltd.

Tutorial

  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA

Legal Stuff

  • About Us
  • Terms of Use
  • Privacy Policy
  • Contact Us

DMCA.com Protection Status

Help

  • Knowledge Base
  • Support

Follow

© 2022 Ittutoria. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.