Can't install wxpython on my local computer

Hi there,
How to solve this error, i have installed Visual Studio also, but still get error, thank you

ERROR: Command errored out with exit status 1:

command: ‘C:\Users\ASUS\AppData\Local\Programs\Python\Python310\python.exe’ -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\ASUS\AppData\Local\Temp\pip-install-rp9lq5n6\wxpython_b3eb7f60ba14486381aed27c5343e0ae\’"’"’; file=’"’"‘C:\Users\ASUS\AppData\Local\Temp\pip-install-rp9lq5n6\wxpython_b3eb7f60ba14486381aed27c5343e0ae\’"’"’;f = getattr(tokenize, ‘"’"‘open’"’"’, open)(file) if os.path.exists(file) else io.StringIO(’"’"‘from setuptools import setup; setup()’"’"’);code =’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record ‘C:\Users\ASUS\AppData\Local\Temp\pip-record-w90r5rnx\install-record.txt’ --single-version-externally-managed --compile --install-headers ‘C:\Users\ASUS\AppData\Local\Programs\Python\Python310\Include\wxpython’
cwd: C:\Users\ASUS\AppData\Local\Temp\pip-install-rp9lq5n6\wxpython_b3eb7f60ba14486381aed27c5343e0ae\

Complete output (49 lines):
C:\Users\ASUS\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\ UserWarning: Usage of dash-separated ‘license-file’ will not be supported in future versions. Please use the underscore name ‘license_file’ instead
running install
running build
C:\Users\ASUS\AppData\Local\Temp\pip-install-rp9lq5n6\wxpython_b3eb7f60ba14486381aed27c5343e0ae\ DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.dep_util import newer, newer_group
Will build using: “C:\Users\ASUS\AppData\Local\Programs\Python\Python310\python.exe”
3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)]
Python’s architecture is 64bit
cfg.VERSION: 4.1.1

Running command: build
Running command: build_wx
Command ‘“C:\Users\ASUS\AppData\Local\Programs\Python\Python310\python.exe” -c “import setuptools, distutils.msvc9compiler as msvc; mc = msvc.MSVCCompiler(); mc.initialize(); print(”’ failed with exit code 1.
Traceback (most recent call last):

distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.2 or greater is required. Get it with “Microsoft C++ Build Tools”: Microsoft C++ Build Tools - Visual Studio

wxPython 4.1.1 doesn’t work on Windows with Python 3.10. Please try Python 3.9 (or lower), or wait until there is a new release which should (hopefully?) be soon. Or you could try building the master branch.

1 Like