I have same issue when install wxPython on my PC Win10 with Visual Studio 2010 installed. Could you please help? I am newbie and learning Python.
Here is the error.
C:\Users\Tom>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\Tom\appdata\local\programs\python\python311\lib\site-packages (from wxPython) (9.4.0)
Requirement already satisfied: six in c:\users\Tom\appdata\local\programs\python\python311\lib\site-packages (from wxPython) (1.16.0)
Requirement already satisfied: numpy in c:\users\Tom\appdata\local\programs\python\python311\lib\site-packages (from wxPython) (1.24.2)
Building wheels for collected packages: wxPython
Building wheel for wxPython (setup.py) … error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [35 lines of output]
C:\Users\Tom\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py:788: UserWarning: Usage of dash-separated ‘license-file’ will not be supported in future versions. Please use the underscore name ‘license_file’ instead
warnings.warn(
C:\Users\Tom\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\config\setupcfg.py:516: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
C:\Users\Tom\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py:328: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running bdist_wheel
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:\Users\Tom\AppData\Local\Programs\Python\Python311\python.exe" -u build.py build
Will build using: "C:\Users\Tom\AppData\Local\Programs\Python\Python311\python.exe"
3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)]
Python's architecture is 64bit
cfg.VERSION: 4.2.0
Running command: build
Running command: build_wx
Command '"C:\Users\Tom\AppData\Local\Programs\Python\Python311\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('x64', 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>
File "C:\Users\Tom\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\msvc.py", line 1107, in __init__
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: No suitable Microsoft Visual C++ version found
Finished command: build_wx (0.462s)
Finished command: build (0.463s)
Command '"C:\Users\Tom\AppData\Local\Programs\Python\Python311\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: Failed building wheel for wxPython
Running setup.py clean for wxPython
Failed to build wxPython
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
╰─> [37 lines of output]
C:\Users\Tom\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py:788: UserWarning: Usage of dash-separated ‘license-file’ will not be supported in future versions. Please use the underscore name ‘license_file’ instead
warnings.warn(
C:\Users\Tom\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\config\setupcfg.py:516: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
C:\Users\Tom\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py:328: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running install
C:\Users\Tom\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
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:\Users\Tom\AppData\Local\Programs\Python\Python311\python.exe" -u build.py build
Will build using: "C:\Users\Tom\AppData\Local\Programs\Python\Python311\python.exe"
3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)]
Python's architecture is 64bit
cfg.VERSION: 4.2.0
Running command: build
Running command: build_wx
Command '"C:\Users\Tom\AppData\Local\Programs\Python\Python311\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('x64', 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>
File "C:\Users\Tom\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\msvc.py", line 1107, in __init__
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: No suitable Microsoft Visual C++ version found
Finished command: build_wx (0.463s)
Finished command: build (0.464s)
Command '"C:\Users\Tom\AppData\Local\Programs\Python\Python311\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.