Importerror: Dll Load Failed: %1 Is Not a Valid Win32 Application. But the Dll's Are There

ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL's are there

Unofficial Windows Binaries for Python Extension Packages

You can find any Python libraries from here.

ImportError: DLL load failed: %1 is not a valid Win32 application - scikit-learn+

I was able to fix it.

The way to go was 'force-reinstall'.

This was enough to get scikit-learn up and running.

pip install --upgrade --force-reinstall scipy

DLL Load failed: %1 is not a valid Win32 Application for StatsModel

Figured this out after talking it through with others who had similar problems.

Don't know if these steps were necessary but, to be sure I uninstalled Python then specifically reinstalled the 64 bit version. Then I uninstalled Anacondas and reinstalled specifically the 64 bit version. Note I believe Python defaults to a 32 bit version.

Then, despite reinstalling Anaconda, I still had the same error. So, for every package that I was getting an error from, I installed the package out of
http://www.lfd.uci.edu/~gohlke/pythonlibs/

So for me personally, I was throwing an error from statsmodels, so I installed it out of the above link.

Installation method is
1) Download correct file from above link
2) open CMD, type pip install then drag the file from the downloads folder into the CMD, and hit enter

Thank you!

Solving DLL load failed: %1 is not a valid Win32 application. for Pygame

It could be due to the architecture of your OS. Is your OS 64 Bit and have you installed 64 bit version of Python? It may help to install both 32 bit version Python 3.1 and Pygame, which is available officially only in 32 bit and you won't face this problem.

I see that 64 bit pygame is maintained here, you might also want to try uninstalling Pygame only and install the 64 bit version on your existing python3.1, if not choose go for both 32-bit version.

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

The ImportError message is a bit misleading because of the reference to Win32, whereas the problem was simply the OpenCV DLLs were not found.

This problem was solved by adding the path the OpenCV binaries to the Windows PATH environment variable (as an example, on my computer this path is: C:\opencv\build\bin\Release).

cx-freeze ImportError: DLL load failed: %1 is not a valid Win32 application

In 90% of cases this error is the result of some mixing of 64bit and 32bit. Assuming all your tests here are accurate, I'm guessing the dev machine you are using has everything at 64bit, but the other windows machine either has a DLL that was desinged for 32 bit, or the windows system itself is a 32bit installation (even if the machine itself is 64 bit).

Don't worry about sys.platform returning win32, that's what it does.

Try the basics on both machines: right click on computer in the file explorer and then properties - see if the installation of windows is 32 or 64 bit. If the other machine is 32 bit, then your exe isn't compatible with it unless you're willing to change the OS.

An alternative solution: install the python 32 bit version on your dev machine, making the exe file with it pretty much guarantees that it will work on both 32 and 64 bit system.



Related Topics



Leave a reply



Submit