Python Forum
[WinError 193] %1 is not a valid Win32 application
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[WinError 193] %1 is not a valid Win32 application
#11
im actually not 100% positive. Its been too long since i even compiled c.

But if your loading a library in windows that was built on linux or vice versa, your not going to be successful. Every time i seen "%1 is not a valid Win32 application" error, it was due to 32/64 bit conflict.

Did you build this library? Did your friend? Did they use 32 or 64 bit to build? You might be using the opposite bit type to run it.
Recommended Tutorials:
Reply
#12
well, i'll try to compile them to .dll tomorrow with a linux machine and see what happens (its not working via cygwin). otherwise i'll just have to talk to the author of the toolbox i guess. thanks for the help, i'll let you know how it went
Reply
#13
Quote:well, i'll try to compile them to .dll tomorrow with a linux machine and see what happens (its not working via cygwin).
That i am also not 100% sure....but the best way is if you want it compiled for linux, compile it on linux...not cygwin, if you want it compiled on windows, compile it on windows..not a virtual machine running on linux, etc.
Recommended Tutorials:
Reply
#14
Do you actually need to compile python? The executables on the mothership are pretty good already...
Reply
#15
well, i've tried to compile them to .dll files today but it failed. so i contacted the author and she said the toolbox was designed and written for linux and not compatible with windows. so now i've installed a virtual machine+ubuntu and it is working alright in there.

thanks for all the help.
Reply
#16
I worked on this problem for a long time. I am new to Anaconda and virtual environments. I have been using Thonny for a few years and am really confident in that but the TensorFlow package does not work within Thonny. I looked at an issue with the DLL's and uninstalled libraries and reinstalled libraries to no avail. Here is my solution as I hope that it will help someone else that is having this same issue.

1. Doublecheck that Python (3.7 for me) and Anaconda3 are running 64 bit or 32 bit (I am running a 64 bit on a MS Surface Pro)
2. Uninstall PyCharm
3. Make sure that all the libraries are installed that you would like to install in your Anaconda3 virtual environment.
4. Reinstall PyCharm. When you reinstall if you are using the 64 bit make sure to select the 64 bit shortcut and install

This fixed my issues as I though that PyCharm was automatically 64 bit as the information on the about part said that, but that apparently is incorrect.

Good Luck
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020