This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: msvc9compiler does not find a vcvarsall.bat of Visual C++ for Python 9.0
Type: Stage: resolved
Components: Distutils Versions: Python 2.7
Status: closed Resolution: duplicate
Dependencies: Superseder: cannot find vcversall.bat on MSWin 8.1 if installed in user AppData
View: 31932
Assigned To: Nosy List: dstufft, eric.araujo, jyrkih
Priority: normal Keywords:

Created on 2016-11-15 21:08 by jyrkih, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (1)
msg280894 - (view) Author: Jiří Hofman (jyrkih) Date: 2016-11-15 21:08
When running
"c:\Program Files\Python27\Scripts\pip2.7.exe" install wx
following error occurs:

    Complete output from command "c:\program files\python27\python.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\jiri\\appdata\\local\\temp\\pip-build-lqokio\\wx\\';f=getattr(tokenize, 'open', open)(__file__);'\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\jiri\appdata\local\temp\pip-51m45m-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    WARNING: Building this way assumes that all generated files have been
    generated already.  If that is not the case then use 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:\program files\python27\python.exe" -u build
    Will build using: "c:\program files\python27\python.exe"
    2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)]
    Python's architecture is 64bit
    cfg.VERSION: 3.0.3

    Running command: build
    Running command: build_wx
    Command '"c:\program files\python27\python.exe" -c "import distutils.msvc9compiler as msvc; mc = msvc.MSVCCompiler(); mc.initialize(); print("' failed with exit code 1.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\program files\python27\lib\distutils\", line 385, in initialize
        vc_env = query_vcvarsall(VERSION, plat_spec)
      File "c:\program files\python27\lib\distutils\", line 273, in query_vcvarsall
        raise DistutilsPlatformError("Unable to find vcvarsall.bat")
    distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat
    Finished command: build_wx (0.138s)
    Finished command: build (0.139s)
    Command '"c:\program files\python27\python.exe" -u build' failed with exit code 1.

I found out that the problem is in msvc9compiler. The dir where vcvarsall.bat is installed is not found. It is installed (by default) in C:\Users\Jiri\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0
Needed registry keys do not exist after installation of the Visual C++ for Python 9.0.

My OS is Windows 10 Home (64bit).
Date User Action Args
2022-04-11 14:58:39adminsetgithub: 72892
2017-11-03 17:12:46skrahsetstatus: open -> closed
superseder: cannot find vcversall.bat on MSWin 8.1 if installed in user AppData
resolution: duplicate
stage: resolved
2016-11-15 21:08:30jyrkihcreate