windows 10 , install wxPython failed

Hi all ,
in windows 10 , I have installed python-3.7.0b1-amd64,but when I install wxPython , it failed.

here’s the error message.

C:\WINDOWS\system32>pip install wxpython
Collecting wxpython
Using cached wxPython-4.0.1.tar.gz
Requirement already satisfied: six in c:\python\python37\lib\site-packages (from wxpython)
Installing collected packages: wxpython
Running setup.py install for wxpython … error
Complete output from command c:\python\python37\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\sniper\AppData\Local\Temp\pip-build-2zu5wv48\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\sniper\AppData\Local\Temp\pip-6kg9cvdl-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
Will build using: “c:\python\python37\python.exe”
3.7.0b1 (v3.7.0b1:9561d7f, Jan 31 2018, 07:26:34) [MSC v.1900 64 bit (AMD64)]
Python’s architecture is 64bit
cfg.VERSION: 4.0.1

Running command: build
Running command: build_wx
Command '"c:\python\python37\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 "c:\python\python37\lib\distutils\msvc9compiler.py", line 372, in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
  File "c:\python\python37\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.100s)
Finished command: build (0.100s)
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:\python\python37\python.exe" -u build.py build
Command '"c:\python\python37\python.exe" -u build.py build' failed with exit code 1.
···
----------------------------------------

Command “c:\python\python37\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\sniper\AppData\Local\Temp\pip-build-2zu5wv48\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\sniper\AppData\Local\Temp\pip-6kg9cvdl-record\install-record.txt --single-version-externally-managed --compile” failed with error code 1 in C:\Users\sniper\AppData\Local\Temp\pip-build-2zu5wv48\wxpython\

How can I fixed it? thanx!

Hi all ,
in windows 10 , I have installed python-3.7.0b1-amd64,but when I install wxPython , it failed.

here’s the error message.

C:\WINDOWS\system32>pip install wxpython
Collecting wxpython
Using cached wxPython-4.0.1.tar.gz

There are no binaries on PyPI for 3.7 yet, so pip is trying to build wxPython from the source code.

Command ‘“c:\python\python37\python.exe” -c “import distutils.msvc9compiler as msvc; mc = msvc.MSVCCompiler(); mc.initialize(); print(mc.cc)”’ failed with exit code 1.

But you apparently do not have the Visual Studio compiler installed.

···

On Wednesday, February 21, 2018 at 1:16:08 PM UTC-8, monkeycd@gmail.com wrote:

Robin Dunn

Software Craftsman

http://wxPython.org

Hi all ,
    in windows 10 , I have installed python-3.7.0b1-amd64,but when I install wxPython , it failed.

   here's the error message.

C:\WINDOWS\system32>pip install wxpython
Collecting wxpython
  Using cached wxPython-4.0.1.tar.gz

There are no binaries on PyPI for 3.7 yet, so pip is trying to build wxPython from the source code.

    Command '"c:\python\python37\python.exe" -c "import distutils.msvc9compiler as msvc; mc = msvc.MSVCCompiler(); mc.initialize(); print(mc.cc)"' failed with exit code 1.

But you apparently do not have the Visual Studio compiler installed.

A list of visual studio compiler downloads, and other steps, is available at https://wiki.python.org/moin/WindowsCompilers you also need to ensure that the compiler is on your path when trying to install wxPython.
WindowsCompilers - Python Wiki<https://wiki.python.org/moin/WindowsCompilers>
wiki.python.org
Even though Python is an interpreted language, you may need to install Windows C++ compilers in some cases. Unlike Linux, compilers for Windows are not included by ...

···

From: wxpython-users@googlegroups.com <wxpython-users@googlegroups.com> on behalf of Robin Dunn <robin@alldunn.com>
Sent: 22 February 2018 02:15
To: wxPython-users
Subject: [wxPython-users] Re: windows 10 , install wxPython failed

On Wednesday, February 21, 2018 at 1:16:08 PM UTC-8, monkeycd@gmail.com wrote:

--
Robin Dunn
Software Craftsman
http://wxPython.org

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.