Home>
I want to achieve

I've been using Python 3.8 so far.
I installed it because the new Python 3.9 was released.
When I try to install wxPython with a newer one, I get a long error like this:

Even if you look at the internet, it is difficult to solve it, so please answer.

C: \ users \ [name]>pip install wxPython --user
Collecting wxPython
  Using cached wxPython-4.1.0.tar.gz (65.8 MB)
Requirement already satisfied: pillow in c: \ users \ [name] \ appdata \ local \ programs \ python \ python39 \ lib \ site-packages (from wxPython) (8.0.1)
Requirement already satisfied: six in c: \ users \ [name] \ appdata \ local \ programs \ python \ python39 \ lib \ site-packages (from wxPython) (1.15.0)
Requirement already satisfied: numpy in c: \ users \ [name] \ appdata \ local \ programs \ python \ python39 \ lib \ site-packages (from wxPython) (1.19.4)
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: Command errored out with exit status 1:
     command:'C: \ Users \ [name] \ AppData \ Local \ Programs \ Python \ Python39 \ python.exe' -u -c'import sys, setuptools, tokenize;sys.argv [0] ='"'"' C: \\ Users \\ [name] \\ AppData \\ Local \\ Temp \\ pip-install-5h8598fb \\ wxpython \\ setup.py'"'"';__file __ ='"'"' C: \ \ Users \\ [name] \\ AppData \\ Local \\ Temp \\ pip-install-5h8598fb \\ wxpython \\ setup.py'"'"';f = getattr (tokenize,'"'"' open' "'"', open) (__ file__);code = f.read (). replace ('"'"'\ r \ n'"'"','"'"'\ n'"'"');f.close ();exec (compile (code, __file__,'"'"'exec'"'"')' install --record' C: \ Users \ [name] \ AppData \ Local \ Temp \ pip- record-a0stxcs9 \ install-record.txt'--single-version-externally-managed --user --prefix = --compile --install-headers' C: \ Users \ [name] \ AppData \ Roaming \ Python \ Python39 \ Include \ wxPython'
         cwd: C: \ Users \ [name] \ AppData \ Local \ Temp \ pip-install-5h8598fb \ wxpython \
    Complete output (33 lines):
    running installrunning build
    Will build using: "C: \ Users \ [name] \ AppData \ Local \ Programs \ Python \ Python39 \ python.exe"
    3.9.0 (tags/v3.9.0: 9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)]
    Python's architecture is 64bit
    cfg.VERSION: 4.1.0
    Running command: build
    Running command: build_wx
    Command'"C: \ Users \ [name] \ AppData \ Local \ Programs \ Python \ Python39 \ python.exe" -c "import setuptools, 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 "C: \ Users \ [name] \ AppData \ Local \ Programs \ Python \ Python39 \ lib \ distutils \ msvc9compiler.py", line 371, in initialize
        vc_env = query_vcvarsall (VERSION, plat_spec)
      File "C: \ Users \ [name] \ AppData \ Local \ Programs \ Python \ Python39 \ lib \ site-packages \ setuptools \ msvc.py", line 140, in msvc9_query_vcvarsall
        return EnvironmentInfo (arch, ver) .return_env ()
      File "C: \ Users \ [name] \ AppData \ Local \ Programs \ Python \ Python39 \ lib \ site-packages \ setuptools \ msvc.py", line 1742, in return_env
        [self.VCIncludes,
      File "C: \ Users \ [name] \ AppData \ Local \ Programs \ Python \ Python39 \ lib \ site-packages \ setuptools \ msvc.py", line 1284, in VCIncludes
        return [join (self.si.VCInstallDir,'Include'),
      File "C: \ Users \ [name] \ AppData \ Local \ Programs \ Python \ Python39 \ lib \ site-packages \ setuptools \ msvc.py", line 842, in VCInstallDirraise distutils.errors.DistutilsPlatformError (msg)
    distutils.errors.DistutilsPlatformError: Microsoft Visual C ++ 14.2 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
    Finished command: build_wx (0.344s)
    Finished command: build (0.344s)
    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 \ [name] \ AppData \ Local \ Programs \ Python \ Python39 \ python.exe" -u build.py build
    Command'"C: \ Users \ [name] \ AppData \ Local \ Programs \ Python \ Python39 \ python.exe" -u build.py build' failed with exit code 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1:'C: \ Users \ [name] \ AppData \ Local \ Programs \ Python \ Python39 \ python.exe' -u -c' import sys, setuptools, tokenize;sys.argv [ 0] ='"'"' C: \\ Users \\ [name] \\ AppData \\ Local \\ Temp \\ pip-install-5h8598fb \\ wxpython \\ setup.py'"'"';__file__ = '"'"' C: \\ Users \\ [name] \\ AppData \\ Local \\ Temp \\ pip-install-5h8598fb \\ wxpython \\ setup.py'"'"';f = getattr (tokenize) ,'"'"' open'"'"', open) (__ file__);code = f.read (). replace ('"'"'\ r \ n'"'"','"'"' \ n'"'"');f.close ();exec (compile (code, __file__,'"'"'exec'"'"')' install --record' C: \ Users \ [name] \ AppData \ Local \ Temp \ pip-record-a0stxcs9 \ install-record.txt' --single-version-externally-managed --user --prefix = --compile --install-headers' C: \ Users \ [name ] \ AppData \ Roaming \ Python \ Python39 \ Include \ wxPython'Check the logs for full command output.
environment

Windows 10
64bit
Python 3.9

  • Answer # 1

    What is installed with pip is pypi
    https://pypi.org/project/wxPython/#files

    There is a list of files downloaded from,
    There is no binary (py39) for python3.9.

    The latest release of the wxPython site is also
    wxPython 4.1.0 Released The wxPython Team 2020-04-24 00:00
    So I want to see before python3.9.

    Using legacy'setup.py install' for wxPython, since package'wheel' is not installed.

    wheelIs not installed,
    I'm trying to download the source code and build it myself.
    In this case, a separate development environment such as wxWidgets (a library used by wxPython) is required.


    The binary for Python 3.9 is not a stabilizer,
    A snapshot of the development version has been released.

    https://wxpython.org/Phoenix/snapshot-builds/

    pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython == 4.1.1a1.dev5063 + 1d243a37

    * The installation method using pip is described in the README in the URL.
    * Check the specified part of the version from the above URL.

    Other packages for other distributions, such as for anaconda
    It may be prepared.