hello, when i install wxPython, i meet the failure like this, i can’t find de solution method, please help me, thanks
ERROR: Could not build wheels for wxpython, which is required to install pyproject.toml-based projects
the whole information is as below
C:\Users\Administrator>pip install wxpython==4.0.4
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting wxpython==4.0.4
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/17/74/7c3ced03c3c76b9f98e4a0edae1801755a7599ebf481c04d9f77dfff17e3/wxPython-4.0.4.tar.gz (68.8 MB)
Installing build dependencies … done
Getting requirements to build wheel … done
Installing backend dependencies … done
Preparing metadata (pyproject.toml) … done
Requirement already satisfied: six in d:\python388\lib\site-packages (from wxpython==4.0.4) (1.16.0)
Requirement already satisfied: Pillow in d:\python388\lib\site-packages (from wxpython==4.0.4) (10.2.0)
Building wheels for collected packages: wxpython
Building wheel for wxpython (pyproject.toml) … error
error: subprocess-exited-with-error
× Building wheel for wxpython (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [52 lines of output]
running bdist_wheel
running build
build.py:30: DeprecationWarning: dep_util is Deprecated. Use functions from setuptools instead.
from distutils.dep_util import newer, newer_group
Will build using: “d:\python388\python.exe”
3.8.8rc1 (tags/v3.8.8rc1:dfd7d68, Feb 17 2021, 11:01:21) [MSC v.1928 64 bit (AMD64)]
Python’s architecture is 64bit
cfg.VERSION: 4.0.4
Running command: build
Running command: build_wx
Command '"d:\python388\python.exe" -c "import distutils.msvc9compiler as msvc; mc = msvc.MSVCCompiler(); mc.initialize(); print(mc.cc)"' failed with exit code 1.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "d:\python388\lib\distutils\msvc9compiler.py", line 372, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "d:\python388\lib\distutils\msvc9compiler.py", line 261, in query_vcvarsall
raise DistutilsPlatformError("Unable to find vcvarsall.bat")
distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat
Finished command: build_wx (0.84s)
Finished command: build (0.84s)
C:\Users\Administrator\AppData\Local\Temp\pip-build-env-69jrhm08\overlay\Lib\site-packages\setuptools\dist.py:678: DistDeprecationWarning: use_2to3 is ignored.
ep.load()(self, ep.name, value)
C:\Users\Administrator\AppData\Local\Temp\pip-build-env-69jrhm08\overlay\Lib\site-packages\setuptools\dist.py:476: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
********************************************************************************
Usage of dash-separated 'license-file' will not be supported in future
versions. Please use the underscore name 'license_file' instead.
By 2024-Sep-26, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
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.
"d:\python388\python.exe" -u build.py build
Command '"d:\python388\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
Failed to build wxpython
ERROR: Could not build wheels for wxpython, which is required to install pyproject.toml-based projects
C:\Users\Administrator>