Skip to content

error in installing wxPython on windows #2024

Closed
@rkadam61001

Description

@rkadam61001
 your issue rC:\Users\HP>pip install -U wxPython

Collecting wxPython
Using cached wxPython-4.1.1.tar.gz (66.0 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pillow in c:\python\lib\site-packages (from wxPython) (8.4.0)
Requirement already satisfied: six in c:\python\lib\site-packages (from wxPython) (1.16.0)
Requirement already satisfied: numpy in c:\python\lib\site-packages (from wxPython) (1.21.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:\python\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HP\AppData\Local\Temp\pip-install-72by_mwf\wxpython_a8f2bd6de2d945b69743e5fd61117a3b\setup.py'"'"'; file='"'"'C:\Users\HP\AppData\Local\Temp\pip-install-72by_mwf\wxpython_a8f2bd6de2d945b69743e5fd61117a3b\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\HP\AppData\Local\Temp\pip-record-pmvep6e2\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\python\Include\wxPython'
cwd: C:\Users\HP\AppData\Local\Temp\pip-install-72by_mwf\wxpython_a8f2bd6de2d945b69743e5fd61117a3b
Complete output (49 lines):
C:\python\lib\site-packages\setuptools\dist.py:697: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
warnings.warn(
running install
running build
C:\Users\HP\AppData\Local\Temp\pip-install-72by_mwf\wxpython_a8f2bd6de2d945b69743e5fd61117a3b\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:\python\python.exe"
3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)]
Python's architecture is 64bit
cfg.VERSION: 4.1.1

Running command: build
Running command: build_wx
Command '"C:\python\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:\python\lib\distutils\msvc9compiler.py", line 371, in initialize

    vc_env = query_vcvarsall(VERSION, plat_spec)

  File "C:\python\lib\site-packages\setuptools\msvc.py", line 140, in msvc9_query_vcvarsall

    return EnvironmentInfo(arch, ver).return_env()

  File "C:\python\lib\site-packages\setuptools\msvc.py", line 1740, in return_env

    [self.VCIncludes,

  File "C:\python\lib\site-packages\setuptools\msvc.py", line 1282, in VCIncludes

    return [join(self.si.VCInstallDir, 'Include'),

  File "C:\python\lib\site-packages\setuptools\msvc.py", line 840, in VCInstallDir

    raise distutils.errors.DistutilsPlatformError(msg)

distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.2 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Finished command: build_wx (0.265s)
Finished command: build (0.265s)
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\python.exe" -u build.py build
Command '"C:\python\python.exe" -u build.py build' failed with exit code 1.
----------------------------------------

ERROR: Command errored out with exit status 1: 'C:\python\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HP\AppData\Local\Temp\pip-install-72by_mwf\wxpython_a8f2bd6de2d945b69743e5fd61117a3b\setup.py'"'"'; file='"'"'C:\Users\HP\AppData\Local\Temp\pip-install-72by_mwf\wxpython_a8f2bd6de2d945b69743e5fd61117a3b\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\HP\AppData\Local\Temp\pip-record-pmvep6e2\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\python\Include\wxPython' Check the logs for full command output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions