I am trying to install the current wxPython on Windows with
pip install -U wxPython
as recommended on wxPython Downloads | wxPython
but no matter whether I try to do this within VSCode or in PS shell, I get the same error
PS D:\pkg\Python\work\wpSkAui> pip install -U wxPython
Collecting wxPython
Using cached wxPython-4.2.0.tar.gz (71.0 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pillow in c:\users\arnold\appdata\local\programs\python\python38-32\lib\site-packages (from wxPython) (9.2.0)
Requirement already satisfied: six in c:\users\arnold\appdata\local\programs\python\python38-32\lib\site-packages (from wxPython) (1.12.0)
Requirement already satisfied: numpy in c:\users\arnold\appdata\local\programs\python\python38-32\lib\site-packages (from wxPython) (1.23.3)
Using legacy 'setup.py install' for wxPython, since package 'wheel' is not installed.
Installing collected packages: wxPython
Running setup.py install for wxPython ... error
error: subprocess-exited-with-error
× Running setup.py install for wxPython did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
running install
running build
Will build using: "c:\users\arnold\appdata\local\programs\python\python38-32\python.exe"
3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 22:39:24) [MSC v.1916 32 bit (Intel)]
Python's architecture is 32bit
cfg.VERSION: 4.2.0
Running command: build
Running command: build_wx
Command '"c:\users\arnold\appdata\local\programs\python\python38-32\python.exe" -c "import os, sys, setuptools.msvc; setuptools.msvc.isfile = lambda path: path is not None and os.path.isfile(path); ei = setuptools.msvc.EnvironmentInfo('x86', vc_min_ver=14.0); env = ei.return_env(); env['vc_ver'] = ei.vc_ver; env['vs_ver'] = ei.vs_ver; env['arch'] = ei.pi.arch; env['py_ver'] = sys.version_info[:2]; print(env)"' failed with exit code 1.
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'EnvironmentInfo' object has no attribute 'vs_ver'
Finished command: build_wx (0.208s)
Finished command: build (0.209s)
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:\users\arnold\appdata\local\programs\python\python38-32\python.exe" -u build.py build
Command '"c:\users\arnold\appdata\local\programs\python\python38-32\python.exe" -u build.py build' failed with exit code 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> wxPython
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
PS D:\pkg\Python\work\wpSkAui>
FWIW & IIRC, I had to install another package ???_attrib, which seemed to get me a bit further along the way, but now I am stuck
As this is a test machine, I now have several versions of Python installed.
PS D:\pkg\Python\work\wpSkAui> py -0
Installed Pythons found by C:\WINDOWS\py.exe Launcher for Windows
-3.10-64 *
-3.9-64
-3.9-32
-3.8-32
-3.7-64
If possible I would prefer to not remove any of the older versions to avoid issues with other projects.