From: Thomas H. <th...@ct...> - 2017-01-18 13:36:39
|
py2exe cannot handle configparser because of the sys.path manipulation that configparser does with the .pth file it installs. Thomas Am 17.01.2017 um 12:02 schrieb Jaime Barrio Jimenez: > Thank You for your fast reply, but it doesn't work for me. > > The output setup py2exe comands: > > */"*** copy dlls ***/* > */copying C:\Python27\lib\site-packages\py2exe\run.exe -> > C:\Users\A558286\workspa/* > */ce\Python\Act_Masivo_Generico\src\dist\GUI.exe/* > */The following modules appear to be missing/* > */['Carbon', 'Carbon.Files', '_sysconfigdata', 'backports', > 'backports.configparse/* > */r']"/* > */ > /* > I think this modules backports missing are relevant. > > An when I executed: > > */"Traceback (most recent call last):/* > */ File "GUI.py", line 15, in <module>/* > */ImportError: No module named backports"/* > */ > /* > Tahnk You > > 2017-01-17 11:54 GMT+01:00 Massa, Harald Armin <ch...@gh... > <mailto:ch...@gh...>>: > > Jaime, > > > > > /*" File "GUI.py", line 14, in <module>*/ > /* File "configparser.pyc", line 12, in <module>*/ > /*ImportError: No module named backports.configparser"*/ > /* > */ > I tried use other kind of import like this from backports import > configparser but it doesn't works. > > With other libraries I need specify the package to import in > options includes like "sip" or "time". It is neccesary include > something in this options to solve the problem? > > > py2exe is challenged with submodules. > > A workaround that often helped me is: > > put lines in your main script as > > import backports > import backports.configparser > > I found with other modules that with this trick py2exe more reliably > finds and includes those files. > > best wishes > > Harald > > > > > > -- > > > > > -- > Un Saludo > Atentamente Jaime Barrio. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Ingeniero Informático (UPM) > Linkedin <http://es.linkedin.com/pub/jaime-barrio-jimenez/32/363/311> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > > > _______________________________________________ > Py2exe-users mailing list > Py2...@li... > https://lists.sourceforge.net/lists/listinfo/py2exe-users > |