Thanks, I will try both after upgrading.
I did try upgrading with pip and it is failing for me. I have Python 2.7 still, but I didn’t know if that would be an issue for wxPython 4.1.1 (4.1.0 said it would be the last to include binaries for 2.7 but that the code would likely work anyway for a while).
I used the following command with pip:
pip install -U wxPython
It started and then generated what follows (what should I do?):
Microsoft Windows [Version 6.1.7601]
Copyright © 2009 Microsoft Corporation. All rights reserved.
C:\Users\agent>pip install -U wxPython
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please
upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop s
upport for Python 2.7 in January 2021. More details about Python 2 support in pi
p can be found at Release process - pip documentation v21.1.dev0
hon-2-support pip 21.0 will remove support for this functionality.
Collecting wxPython
Using cached wxPython-4.1.1.tar.gz (66.0 MB)
Requirement already satisfied, skipping upgrade: pillow in c:\python27\lib\site-
packages (from wxPython) (4.1.0)
Requirement already satisfied, skipping upgrade: six in c:\python27\lib\site-pac
kages (from wxPython) (1.10.0)
Requirement already satisfied, skipping upgrade: numpy<1.17 in c:\python27\lib\s
ite-packages (from wxPython) (1.16.6)
Requirement already satisfied, skipping upgrade: olefile in c:\python27\lib\site
-packages (from pillow->wxPython) (0.44)
Using legacy ‘setup.py install’ for wxPython, since package ‘wheel’ is not insta
lled.
Installing collected packages: wxPython
Running setup.py install for wxPython … error
ERROR: Command errored out with exit status 1:
command: ‘c:\python27\python.exe’ -u -c ‘import sys, setuptools, tokenize;
sys.argv[0] = ‘"’"‘c:\users\agent\appdata\local\temp\pip-install-oijdz8\w
xpython\setup.py’"’"’; file=’"’"‘c:\users\agent\appdata\local\temp\pi
p-install-oijdz8\wxpython\setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, op
en)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec
(compile(code, file, ‘"’"‘exec’"’"’))’ install --record ‘c:\users\agent\appd
ata\local\temp\pip-record-cthc3d\install-record.txt’ --single-version-externally
-managed --compile --install-headers ‘c:\python27\Include\wxPython’
cwd: c:\users\agent\appdata\local\temp\pip-install-oijdz8\wxpython
Complete output (33 lines):
running install
running build
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
–skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future.
"c:\python27\python.exe" -u build.py build
Will build using: "c:\python27\python.exe"
2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
Python's architecture is 32bit
cfg.VERSION: 4.1.1
Running command: build
Running command: build_wx
Command '"c:\python27\python.exe" -c "import setuptools, distutils.msvc9comp
iler as msvc; mc = msvc.MSVCCompiler(); mc.initialize(); print(mc.cc)"’ failed w
ith exit code 1.
Traceback (most recent call last):
File “”, line 1, in
File “c:\python27\lib\distutils\msvc9compiler.py”, line 383, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "c:\python27\lib\site-packages\setuptools\msvc.py", line 147, in msvc
9_query_vcvarsall
return EnvironmentInfo(arch, ver).return_env()
File “c:\python27\lib\site-packages\setuptools\msvc.py”, line 1227, in ret
urn_env
[self.VCIncludes,
File “c:\python27\lib\site-packages\setuptools\msvc.py”, line 876, in VCIn
cludes
return [os.path.join(self.si.VCInstallDir, ‘Include’),
File “c:\python27\lib\site-packages\setuptools\msvc.py”, line 555, in VCIn
stallDir
raise distutils.errors.DistutilsPlatformError(msg)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 9.0 is require
d. Get it from http://aka.ms/vcpython27
Finished command: build_wx (0.553s)
Finished command: build (0.553s)
Command ‘“c:\python27\python.exe” -u build.py build’ failed with exit code 1
.
----------------------------------------
ERROR: Command errored out with exit status 1: ‘c:\python27\python.exe’ -u -c ‘i
mport sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘c:\users\agent\appdata\l
ocal\temp\pip-install-oijdz8\wxpython\setup.py’"’"’; file=’"’"‘c:\users
\agent\appdata\local\temp\pip-install-oijdz8\wxpython\setup.py’"’"’;f=get
attr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"
‘"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ inst
all --record ‘c:\users\agent\appdata\local\temp\pip-record-cthc3d\install-record
.txt’ --single-version-externally-managed --compile --install-headers ‘c:\python
27\Include\wxPython’ Check the logs for full command output.