PySimpleGUI Attribute Error on Windows XP SP3 with Python 3.4.4

96 Views Asked by At

Running a Python program which uses a PySimpleGUI interface on top of TkInter. Program runs well on Windows 10 and CentOS Linux workstations. Unfortunately have a job requirement to also run the program on a Windows XP Service Pack 3 PC in an isolated secret lab area, no internet, so any installations are brought in on a DVD.

Python 3.4.4 was the latest version I could find which supports Windows XP and it installs and runs fine with Tkinter up and running as well.

PC Setup:

Windows XP Service Pack 3

Python 3.4.4

PySimpleGUI 3.39.0

Execution Error:

Traceback (most recent call last): File "PysharkLiveCapGUI.py", line 9, in <module> sg.theme('Topanga') AttributeError: 'module' object has no attribute 'theme'

Path to PySimpleGUI EGG:

Type "help", "copyright", "credits" or "license" for more information.

\>>> import PySimpleGUI as sg

\>>> print(sg)

<module 'PySimpleGUI' from 'C:\\Python34\\lib\\site-packages\\pysimplegui-3.39.0-py3.4.egg\\PySimpleGUI\\_init_.py'>

PySimpleGUI Installation Results:

C:\Python34\Downloads\dist\PySimpleGUI-3.39.0>python setup.py install
C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option:
 'long_description_content_type'
  warnings.warn(msg)
running install
running bdist_egg
running egg_info
writing top-level names to PySimpleGUI.egg-info\top_level.txt
writing PySimpleGUI.egg-info\PKG-INFO
writing dependency_links to PySimpleGUI.egg-info\dependency_links.txt
reading manifest file 'PySimpleGUI.egg-info\SOURCES.txt'
writing manifest file 'PySimpleGUI.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build\bdist.win32\egg
creating build\bdist.win32\egg\PySimpleGUI
copying build\lib\PySimpleGUI\PySimpleGUI.py -> build\bdist.win32\egg\PySimpleGU
I
copying build\lib\PySimpleGUI\__init__.py -> build\bdist.win32\egg\PySimpleGUI
byte-compiling build\bdist.win32\egg\PySimpleGUI\PySimpleGUI.py to PySimpleGUI.c
python-34.pyc
byte-compiling build\bdist.win32\egg\PySimpleGUI\__init__.py to __init__.cpython
-34.pyc
creating build\bdist.win32\egg\EGG-INFO
copying PySimpleGUI.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying PySimpleGUI.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying PySimpleGUI.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-I
NFO
copying PySimpleGUI.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist\PySimpleGUI-3.39.0-py3.4.egg' and adding 'build\bdist.win32\egg'
to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing PySimpleGUI-3.39.0-py3.4.egg
Removing c:\python34\lib\site-packages\PySimpleGUI-3.39.0-py3.4.egg
Copying PySimpleGUI-3.39.0-py3.4.egg to c:\python34\lib\site-packages
PySimpleGUI 3.39.0 is already the active version in easy-install.pth

Installed c:\python34\lib\site-packages\pysimplegui-3.39.0-py3.4.egg
Processing dependencies for PySimpleGUI==3.39.0
Finished processing dependencies for PySimpleGUI==3.39.0

Problem?:

PySimpleGUI installation appeared to run error free. The EGG file looks fine when I inspect it using 7 Zip. Best guess is that Windows XP doesn't know how to read the EGG file although it's within a Python execution where theoretically Python has no problem importing EGG files. Any help with this issue greatly appreciated.

Thanks,

Jeff Stearns

1

There are 1 best solutions below

3
Jason Yang On

Program runs well on Windows 10 and CentOS Linux workstations.

It should be wrong if you have code like sg.theme and you will get exception, no matter on Windows 10, CentOS Linux workstations.

PySimpleGUI 3.39.0

If nothing wrong, function sg.theme released from 4.14.0 PySimpleGUI 23-Dec-2019.

Python 3.4.4

"Upgrade your PySimpleGUI to the most update version" may not work for this version of python. try to use old method sg.change_look_and_feel.