Hi, I would start from scratch with this.
1. You have latest Python 2 version. 2. Use virtualenv to create and activate a new virtual environment. 3. pip install wxPython and other dependencies. 4. Get your application running from the command line first and follow up any DLL exceptions. 5. Use pyinstaller (https://pyinstaller.readthedocs.io/en/stable/) to create a new exe file once you know everything works. Matt On 8 January 2019 10:38:16 GMT, dude.ji...@gmail.com wrote: >Hello, > >first time using python groups (and long time since using any other >group for that matter). This might not be the right group due to wx >being involved. > >Long story as short as possible. I have an old python script that I did >~10 years ago, and have forgotten basically everything about Python >since then (sorry!). Converted it to EXE way back when, and have kept >using the EXE ever since then (on XP, and on Win7). > >I've just gotten a new PC, Windows10 (!), needed to update the script, >so needed to recompile the EXE, and now it no longer compiles/works. It >was fine on Windows7 (I'm not specifically stating that the problem is >with windows10 - I simply don't remember all the hoops I jumped through >on my previous machine). > >Here is the compile error: >The following modules appear to be missing >['_sysconfigdata'] > >And here is the runtime error: >Traceback (most recent call last): > File "AutoArchive.py", line 3, in <module> > File "wx\__init__.pyc", line 45, in <module> > File "wx\_core.pyc", line 4, in <module> > File "wx\_core_.pyc", line 12, in <module> > File "wx\_core_.pyc", line 10, in __load >ImportError: DLL load failed: %1 is not a valid Win32 application. > >Here is how I compile: python setup.py py2exe > >And this is my setup.py: >from distutils.core import setup >import py2exe > >setup(console=['AutoArchive.py']) > >Yes, that says 'console' for a Windows EXE, but swapping it to 'window' >didn't help. Besides which, the setup.py file is straight from the old >computer, so 'it used to work'. > >What I have installed: >. python 2.7.13 (this in itself may be a problem - I don't even >remember which version I was using earlier, other than knowing for sure >it wasn't a 3.x release) >. wxpython (since I also got an error that wx module was missing - >that rang some bells, since the script uses a Windows pop-up window to >inform me about its progress, and I remember using wx for that, so I >installed it, but don't know how to get its' version. using "python -c >"import wx;print wx.__version__" just gives runtime errors). > >Any help would be appreciated. > >And yes, I googled, but can't really find anything (well, d'Uh!, I >wouldn’t be here then would I?) - there's ~some~ references, but >usually it's about similar issues on Linux, with solutions that are not >applicable at all. Except one I thought: I found some link stating that >_sysconfigdata is part of sysconfig, and that this needed to be >installed with pip, so I used the pip that came with my python distro >and did 'pip install [[_]sys]config[data]' (all possible combo's) but >pip claims it can't find said module, and TBH, I can't seem to find >anything myself about said module. > >Thx, >Jimbo >-- >https://mail.python.org/mailman/listinfo/python-list -- Sent from my Android device -- https://mail.python.org/mailman/listinfo/python-list