windows 10 , install wxPython failed

550 views
Skip to first unread message

monk...@gmail.com

unread,
Feb 21, 2018, 4:16:08 PM2/21/18
to wxPython-users
 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!

Robin Dunn

unread,
Feb 21, 2018, 9:15:09 PM2/21/18
to wxPython-users
On Wednesday, February 21, 2018 at 1:16:08 PM UTC-8, monk...@gmail.com wrote:
 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.

 -- 
Robin Dunn
Software Craftsman

Steve Barnes

unread,
Feb 22, 2018, 1:18:53 AM2/22/18
to wxpytho...@googlegroups.com


From: wxpytho...@googlegroups.com <wxpytho...@googlegroups.com> on behalf of Robin Dunn <ro...@alldunn.com>
Sent: 22 February 2018 02:15
To: wxPython-users
Subject: [wxPython-users] Re: windows 10 , install wxPython failed
 
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.
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 ...
Reply all
Reply to author
Forward
0 new messages