Phoenix icon indicating copy to clipboard operation
Phoenix copied to clipboard

Error installing wxPython on Windows. - Reopenign this as I still have this issue as of today.

Open mrhbbt3 opened this issue 3 years ago • 5 comments

I am willing to help debug this issue. Would love to get this resolved soon as I am keen on using wxWidgets on a new project I am starting to work on .

Operating system: Windows 11 with Visual Studio 2019 & 2022 installed. VS Build Tools 16.11.9 wxPython version & source: pypi installed using pip (pip install wxPython) Python version & source: <Stock 3.10.1>

Description of the problem:

Unable to install wxWidget on Windows OS with Python 3.10.1

Log from Installation

Collecting wxPython Using cached wxPython-4.1.1.tar.gz (66.0 MB) Preparing metadata (setup.py) ... done Requirement already satisfied: pillow in c:\users\rdama\appdata\local\programs\python\python310\lib\site-packages (from wxPython) (8.4.0) Requirement already satisfied: six in c:\users\rdama\appdata\local\programs\python\python310\lib\site-packages (from wxPython) (1.16.0) Requirement already satisfied: numpy in c:\users\rdama\appdata\local\programs\python\python310\lib\site-packages (from wxPython) (1.21.4) 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 ╰─> [33 lines of output] C:\Users\xxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py:717: 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\xxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py:294: DistDeprecationWarning: use_2to3 is ignored. warnings.warn(f"{attr} is ignored.", DistDeprecationWarning) running bdist_wheel running build C:\Users\rdama\xxxx\Local\Temp\pip-install-30mec1_5\wxpython_4d1aaa04159842a19252012945ab6e3d\build.py:41: 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\xxxxx\AppData\Local\Programs\Python\Python310\python.exe" 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] Python's architecture is 64bit cfg.VERSION: 4.1.1

  Running command: build
  Running command: build_wx
  MSVC: cl.exe
  Downloading microsoft.web.webview2 1.0.622.22...
  Connection successful...
  Data downloaded...
  wxWidgets build options: ['--wxpython', '--unicode']
  creating wx/msw/setup.h from setup0.h
  setting build options...
  Command 'cl.exe' failed with exit code 1.
  Finished command: build_wx (0m2.370s)
  Finished command: build (0m2.370s)
  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\xxxx\AppData\Local\Programs\Python\Python310\python.exe" -u build.py build
  Command '"C:\Users\xxxx\AppData\Local\Programs\Python\Python310\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 ╰─> [30 lines of output] C:\Users\xxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py:717: 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\xxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py:294: DistDeprecationWarning: use_2to3 is ignored. warnings.warn(f"{attr} is ignored.", DistDeprecationWarning) running install running build C:\Users\xxxxxx\AppData\Local\Temp\pip-install-30mec1_5\wxpython_4d1aaa04159842a19252012945ab6e3d\build.py:41: 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\xxxxxx\AppData\Local\Programs\Python\Python310\python.exe" 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] Python's architecture is 64bit cfg.VERSION: 4.1.1

  Running command: build
  Running command: build_wx
  MSVC: cl.exe
  wxWidgets build options: ['--wxpython', '--unicode']
  creating wx/msw/setup.h from setup0.h
  setting build options...
  Command 'cl.exe' failed with exit code 1.
  Finished command: build_wx (0m1.132s)
  Finished command: build (0m1.132s)
  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\xxxxxx\AppData\Local\Programs\Python\Python310\python.exe" -u build.py build
  Command '"C:\Users\xxxxx\AppData\Local\Programs\Python\Python310\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.

mrhbbt3 avatar Feb 04 '22 18:02 mrhbbt3

Constantly getting same error on OSX

Doyle4 avatar Feb 15 '22 08:02 Doyle4

@swt2c @RobinD42 any progress on this one character fix?

elibroftw avatar Mar 14 '22 16:03 elibroftw

What one character fix?

Until @RobinD42 produces a new release, I would recommend using one of the snapshot builds: https://wxpython.org/Phoenix/snapshot-builds/

See the README.txt there for more information.

swt2c avatar Mar 14 '22 16:03 swt2c

Thank you. And now wxglade doesn't work 😂

elibroftw avatar Mar 14 '22 16:03 elibroftw

@elibroftw Please open a ticket at the wxGlade tracker. https://github.com/wxGlade/wxGlade/issues

DietmarSchwertberger avatar Mar 19 '22 14:03 DietmarSchwertberger