Youcompleteme: could not find any instance of Visual Studio, when i run python install.py --clang-completer

Created on 11 Mar 2018  路  6Comments  路  Source: ycm-core/YouCompleteMe

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside
the brackets) _before_ filing your issue:

  • [x ] I have read and understood YCM's CONTRIBUTING document.
  • [x] I have read and understood YCM's CODE_OF_CONDUCT document.
  • [x ] I have read and understood YCM's README, especially the
    Frequently Asked Questions section.
  • [x ] I have searched YCM's issue tracker to find issues similar to the one I'm
    about to report and couldn't find an answer to my problem. (Example Google
    search.
    )
  • [ ] If filing a bug report, I have included the output of vim --version.
  • [ ] If filing a bug report, I have included the output of :YcmDebugInfo.
  • [ ] If filing a bug report, I have attached the contents of the logfiles using
    the :YcmToggleLogs command.
  • [ ] If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • [ ] If filing a bug report, I have included a minimal test case that reproduces
    my issue, including what I expected to happen and what actually happened.
  • [ ] If filing a installation failure report, I have included the entire output
    of install.py (or cmake/make/ninja) including its invocation
  • [x] I understand this is an open-source project staffed by volunteers and
    that any help I receive is a selfless, heartfelt _gift_ of their free time. I
    know I am not entitled to anything and will be polite and courteous.
  • [x] I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.

Issue Details

I want to build ycm by using "python install.py --clang-completer" in the folder "C:UsersAdministratorvimfilesbundleYouCompleteMe "on window 10 (64 bit ).

this is the error message:

Searching Python 2.7 libraries...
Found Python library: C:Python27libspython27.lib
Found Python headers folder: C:Python27include
CMake Error at CMakeLists.txt:26 (project):
Generator

Visual Studio 15 2017 Win64

could not find any instance of Visual Studio.

-- Configuring incomplete, errors occurred!
See also "C:/Users/Administrator/AppData/Local/Temp/ycm_build_lrzl72/CMakeFiles/CMakeOutput.log".
ERROR: the build failed.

NOTE: it is highly unlikely that this is a bug but rather
that this is a problem with the configuration of your system
or a missing dependency. Please carefully read CONTRIBUTING.md
and if you're sure that it is a bug, please raise an issue on the
issue tracker, including the entire output of this script
and the invocation line used to run it.

I can not open this folder, so I don't know what the log is.

Provide a clear description of the problem, including the following key
questions:

  • What did you do?
  • i installed vim8.0.1589-x64.exe ( from https://bintray.com/micbou/generic/vim),
  • this is my _vimrc
    set encoding=utf-8
    set number
    set relativenumber

set rtp+=~/vimfiles/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'flazz/vim-colorschemes'
Plugin 'scrooloose/nerdTree'
Plugin 'aperezdc/vim-template'
Plugin 'vim-scripts/DoxygenToolkit.vim'
Plugin 'Shougo/vimshell.vim'
Plugin 'Shougo/vimproc.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required

i use Vundle to download all this plugin. all done.

  1. i installed cmake-3.11.0-rc3-win64-x64. added it to my path.
  2. i installed vs2017 community version( I also have vs2012 ultimate on my machine, but ycm do not support this version. ). and chose C++ development .

  3. in C:UsersAdministratorvimfilesbundleYouCompleteMe . I run "python install.py --clang-completer"

  4. i got this error
    Searching Python 2.7 libraries...
    Found Python library: C:Python27libspython27.lib
    Found Python headers folder: C:Python27include
    CMake Error at CMakeLists.txt:26 (project):
    Generator

    Visual Studio 15 2017 Win64

    could not find any instance of Visual Studio.

-- Configuring incomplete, errors occurred!
See also "C:/Users/Administrator/AppData/Local/Temp/ycm_build_lrzl72/CMakeFiles/CMakeOutput.log".
ERROR: the build failed.

NOTE: it is highly unlikely that this is a bug but rather
that this is a problem with the configuration of your system
or a missing dependency. Please carefully read CONTRIBUTING.md
and if you're sure that it is a bug, please raise an issue on the
issue tracker, including the entire output of this script
and the invocation line used to run it.

  • What did you expect to happen?

Include description of the expected behaviour.

  • What actually happened?

Searching Python 2.7 libraries...
Found Python library: C:Python27libspython27.lib
Found Python headers folder: C:Python27include
CMake Error at CMakeLists.txt:26 (project):
Generator

Visual Studio 15 2017 Win64

could not find any instance of Visual Studio.

-- Configuring incomplete, errors occurred!
See also "C:/Users/Administrator/AppData/Local/Temp/ycm_build_lrzl72/CMakeFiles/CMakeOutput.log".
ERROR: the build failed.

NOTE: it is highly unlikely that this is a bug but rather
that this is a problem with the configuration of your system
or a missing dependency. Please carefully read CONTRIBUTING.md
and if you're sure that it is a bug, please raise an issue on the
issue tracker, including the entire output of this script
and the invocation line used to run it.

Diagnostic data

Output of vim --version

i don't know how to copy those info. but i download vim(
vim8.0.1589-x64.exe) from "https://bintray.com/micbou/generic/vim"

Output of YcmDebugInfo

i do not have this file.

Contents of YCM, ycmd and completion engine logfiles

I do not have this file.

OS version, distribution, etc.

OS Name Microsoft Windows 10 Pro
Version 10.0.16299 Build 16299
Other OS Description Not Available
OS Manufacturer Microsoft Corporation
System Name DESKTOP-A76Q0J4
System Manufacturer Dell Inc.
System Model Inspiron 5577
System Type x64-based PC
System SKU 07E1
Processor Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz, 2801 Mhz, 4 Core(s), 8 Logical Processor(s)
BIOS Version/Date Dell Inc. 1.0.5, 6/23/2017
SMBIOS Version 3.0
Embedded Controller Version 255.255
BIOS Mode Legacy
BaseBoard Manufacturer Dell Inc.
BaseBoard Model Not Available
BaseBoard Name Base Board
Platform Role Mobile
Secure Boot State Unsupported
PCR7 Configuration Binding Not Possible
Windows Directory C:Windows
System Directory C:Windowssystem32
Boot Device DeviceHarddiskVolume1
Locale China
Hardware Abstraction Layer Version = "10.0.16299.248"
User Name DESKTOP-A76Q0J4Administrator
Time Zone China Standard Time
Installed Physical Memory (RAM) 8.00 GB
Total Physical Memory 7.86 GB
Available Physical Memory 2.84 GB
Total Virtual Memory 15.9 GB
Available Virtual Memory 7.86 GB
Page File Space 8.00 GB
Page File C:pagefile.sys
Virtualization-based security Not enabled
Device Encryption Support Reasons for failed automatic device encryption: PCR7 binding is not supported, Hardware Security Test Interface failed and device is not InstantGo, Un-allowed DMA capable bus/device(s) detected, WinRE is not configured
Hyper-V - VM Monitor Mode Extensions Yes
Hyper-V - Second Level Address Translation Extensions Yes
Hyper-V - Virtualization Enabled in Firmware Yes
Hyper-V - Data Execution Protection Yes

Output of build/install commands

python install.py --clang-completer

Most helpful comment

I only have this folder "C:Program Files (x86)Microsoft Visual Studio2017Community".
this subfolder is : common7, licenses, msbuild, team tools, xml

The VC folder should be there. Are you sure you selected Desktop development with C++ in the Workloads tab during installation of Visual Studio 2017? Run again the vs_Community.exe installer, click Continue, wait for the products screen to appear, click on Modify under Visual Studio Community 2017, and check if Desktop development with C++ is selected under Windows. If not, select it then click on the Modify button to install it. Once it's done, leave the installer and run again the install.py script.

and do you mean i need to install vs2015 or vs 2013?

No, it should work fine with VS 2017.

All 6 comments

by the way, i run this command "git submodule update --init --recursive". and my ycm is up-to-date.

For some reason, CMake is unable to find your Visual Studio 2017 installation. Could you check if the file

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt

exists? CMake is looking for it. Also, did you restart after installing the community edition of Visual Studio 2017? This could be needed.

I only have this folder "C:Program Files (x86)Microsoft Visual Studio2017Community".
this subfolder is : common7, licenses, msbuild, team tools, xml
and i don't have this file. "Microsoft.VCToolsVersion.default.txt"

yes, i have restarted my computer.

and do you mean i need to install vs2015 or vs 2013?

do i need to uninstall vs2017? does it bring some negative effects if i cannot uninstall vs2017 completely?

I only have this folder "C:Program Files (x86)Microsoft Visual Studio2017Community".
this subfolder is : common7, licenses, msbuild, team tools, xml

The VC folder should be there. Are you sure you selected Desktop development with C++ in the Workloads tab during installation of Visual Studio 2017? Run again the vs_Community.exe installer, click Continue, wait for the products screen to appear, click on Modify under Visual Studio Community 2017, and check if Desktop development with C++ is selected under Windows. If not, select it then click on the Modify button to install it. Once it's done, leave the installer and run again the install.py script.

and do you mean i need to install vs2015 or vs 2013?

No, it should work fine with VS 2017.

It worked. Thank you for your help.
It is my fault, I don't select Desktop development with C++

I had the same problem, but I installed VS 2015 instead of VS 2017. I don't know why it is looking for VS 2017.

Was this page helpful?
0 / 5 - 0 ratings