Why vcpkg can't install packages? - visual-studio-2019

When I try to install matplotlib-cpp using vcpkg, the console always returns Computing installation plan..., then nothing happens. After that, I checked the installation package with .\vcpkg list. It seems that this package has not been installed.
I also tried to install other packages and encountered the same situation.
Environment:
Windows 10, 64 bit build 19042
Visual Studio 2019
cmake 3.21.0-rc2
Git
The scene where the problem occurred

We also ran into this. Extremely painful to find as CMake seems to work otherwise. If you use vcpkg at all I would advise not trying CMake 3.21.0 until this is fixed.

Related

CMake - could not find any instance of Visual Studio [duplicate]

When I am trying to install CMake I get the error:
Visual Studio 15 2017 could not find any instance of Visual Studio.
I am using Windows 7 and Visual Studio 2017. The CMakeOutput.log file writes:
The system is: Windows - 6.1.7601 - AMD64
Any ideas?
I ran into the same error and performed the following steps to resolve the issue:
Open Visual Studio
Go to Tools -> Get Tools and Features
In the "Workloads" tab enable "Desktop development with C++"
Click Modify at the bottom right
These steps resulted in the "Visual C++ tools for CMake" feature being installed, but the other optional C++ features included in this workload may also helpful for what you are trying to do.
After the Visual Studio updater finishes installing try re-running the command. You may need to open a new command window.
In my case, I installed Visual Studio, selecting the workloads and modules that I wanted, but I ignored the request to reboot, assuming that shutting down the computer at the end of the day and restarting it the following day would suffice. I was wrong.
The following day I tried a cmake build and got the "could not find any instance of Visual Studio" error. After several attempts to resolve, I re-ran the installer, made no changes to the configuration, and clicked Modify. This time I let it reboot the computer. The reboot took a long time. After which my cmake build worked.
If you have already installed the workload Desktop development with C++ and still getting the following errors while using visual studio 2022 for flutter
Generator
Visual Studio 16 2019
could not find any instance of Visual Studio.
Building Windows application...
Exception: Unable to generate build files"
Solution: Follow these steps,
Edit your_flutter_path\packages\flutter_tools\lib\src\windows\build_windows.dart, and change the constant on line 28 from Visual Studio 16 2019 to Visual Studio 17 2022
Delete flutter_tools.stamp and flutter_tools.snapshot from your_flutter_path\bin\cache\
Run flutter clean in the project
I had the same issue "could not find any instance of Visual Studio"
but with Visual Studio 2019 (Community Edition) and I just had to configure the VS160COMNTOOLS variable so that CMake correctly detects Visual Studio.
export VS160COMNTOOLS="/c/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/Tools"
(cf https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2016%202019.html)
With Visual Studio 15 2017, the variable you need should be VS150COMNTOOLS.
(cf https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2015%202017.html)
NB: in my case, in a Travis-CI workflow, I installed Visual Studio using the commands (no need to reboot):
choco install visualstudio2019community
choco install visualstudio2019-workload-nativedesktop # required
With only the first package, CMake detection of VS2019 failed.
I was configuring a Jenkins build node and could successfully run CMake GUI manually but command line use or builds using the CMake plugin would fail with:
Visual Studio 16 2019 could not find instance of Visual Studio.
-A x64 parameter was added with no change in result.
The problem was that CMake could not determine the Windows SDK version.
By adding CMAKE_SYSTEM_VERSION parameter CMake was then able to find Visual Studio.
-D CMAKE_SYSTEM_VERSION=10.0.18362.0 (use your windows SDK version)
Environment:
windows 10 system build: 19042
CMAKE 3.19.4
VS 2019 Professional 16.8.4
Jenkins 2.235.1
Full command line that worked:
"C:\Program Files\CMake\bin\cmake" -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE=Release -A x64 -D CMAKE_SYSTEM_VERSION=10.0.18362.0
When using VS 2017, be aware that this is really VS 2015, and CMake identified it as VS 2017 2022 which is not the version of VS 2017 I had, that gave me this error. So the conclusion I offer is to try different versions, specifically the 2015 one.
I had a similar issue where installing libzmq in my npm project was throwing the same error and that wasn't getting solved by enabling "msbuild" under "Desktop development with C++" in the Visual Studio installer.
My solution ended up being to reinstall the Windows build tools for npm with the following command.
npm install --global windows-build-tools
Note: Remember to run the command prompt (or whatever terminal you are using) as admin before running this.
If the CMake used to work with the installed Visual Studio and is broken someday, then the problem could be VS requires system reboot to complete some update.
For quick verification, rename HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\Setup\Reboot to like HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\Setup\Reboot.bak, then re-run cmake which should succeed. Don't forget to rename the registry back and reboot the system if this is the problem.
In my case, I was selecting different version of visual studio in that configuration dialog box whereas I installed different version.
Do select the same version.
Above solutions did not solve this issue for me. After installing node.js from https://nodejs.org/en/download/ apparently a correct version of windows-build-tools was installed
I reinstalled the Visual Studio 2019(my former one is 2017 version ) with all those settings required(my cmake version is 3.23.0),and it works. So try to install different versions.
In my case, the problem was gone after I deleted the previous cmake result directory and then ran cmake again.
if you have installed two or more Windows 10 SDK, delete them excluding latest one.
Try downloading the windows-build-tools package.
npm install --global --production windows-build-tools --vs2015
This step should be the end-all-be-all solution to fixing node-gyp problems. For most people, that’s true. NPM has a package called windows-build-tools that should automatically install everything you need to get node-gyp working, including the Microsoft build tools, compilers, Python, and everything else required to build native Node modules on Windows.

spyder showing missing dependencies

Just wondering if this is a spyder bug, or whether there was an update between yesterday and today? spyder was working fine for me yesterday. This error message showed up.
jedi=0.17.1: 0.18.0 (NOK)
parso=0.7.0: 0.8.2 (NOK)
Somewhat related, what do jedi and parso do, and what does "NOK" mean?
(Spyder maintainer here) My answers to your questions:
just wondering if this is a spyder bug, or that there was an update between yesterday and today?
This is not a bug. It means that you have the wrong versions of some of our dependencies (as the message clearly states).
spyder was working fine for me yesterday
You probably ran conda update --all, or installed another package with conda or pip, which updated Jedi and Parso as well.
To fix this problem, you need to reinstall those packages with the right versions. For that, please open the Anaconda Prompt or a system terminal (i.e. cmd.exe) and run one of the following commands:
conda install jedi=0.17 parso=0.7
if you're using Anaconda, or
pip install jedi==0.17.1 parso==0.7.0
if not.
somewhat related, what do jedi and parso do, and what does "NOK" mean?
Jedi provides code completion in the editor and Parso is used for code folding on it as well.
NOK means Not ok.

Windows Cmake Error: No CUDA toolset found

I was doing a project about image processing. I installed darknet, OpenCV and NVIDIA GPU Computing Toolkit\CUDA\v10.2. I was able to get build on OpenCV, but when trying to get build on darknet, it gives the following errors and I couldn't find the solution even though I searched for hours.
CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeDetermineCompilerId.cmake:367 (message):
No CUDA toolset found.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:60 (enable_language)
You need to have both the "development" and "Visual Studio Integration" components installed.
If you have only the first one installed (i.e. you have all you need to develop with cuda) but not the latter, then CMake won't find cuda!
just run the installer again and select "Visual Studio Integration" component (even without reinstalling the rest)
I faced the same problem, by this step you probably have installed the cuda toolkit and visual studio but which one did you installed first?
I recommend installing visual studio 2017 community edition, then reinstall the CUDA toolkit, do not uninstall the current version that you have, this will create the Visual studio support for your cuda. Then at the time of "configure" in CMake, choose Visual Studio 2017 as compiler, I hope this help you.
edit: I used CMake 3.16.0
It is effective to reinstall cuda without uninstalling the original cuda

How to install luarocks for Windows 10

So I've been searching everywhere and I'm completely stuck right now. Initially I just installed the binaries which came with luarocks.exe and luarocks_admin.exe but with that there was no config file so when I go to install the luarocks-mysql module, luarocks was unable to find the lua library and said I needed to set the LUA_LIBDIR variable in the config. I can't make changes to the luarocks config though because it either doesn't exist or I can't find it.
After getting this problem I went back to install the luarocks all in one package but I'm unable to follow the instructions because I can't find the install.bat file that they were talking about. Sorry if this is a lot but I'm just running into a bunch of problems right now.
EDIT: Just use Ubuntu, it's 100 times easier.
I had similar problems. I didn't look for a solution and just installed wsl on windows 10.
https://learn.microsoft.com/en-us/windows/wsl/install
Then execute the commands in the console:
sudo apt install lua5.3 liblua5.3-0 liblua5.3-dev
sudo apt install luarocks

Use Android Studio 2.2 CMake support with command line SDK

We recently decided to use Android Studio's CMake support as a part of our development, and as far as compiling and building is concerned everything works fine for the development team.
As a part of our validation efforts we are also running Jenkins for continuous testing, and that's where the problems are starting. The machine running Jenkins does not have Android Studio installed, nor it has an UI. As such it only possesses the android NDK and SDK. However, when running tests, the following error occurs :
Failed to find CMake.
Install from Android Studio under File/Settings/Appearance & Behavior/System Settings/Android SDK/SDK Tools/CMake.
Expected CMake executable at /home/vagrant/android-sdk-linux/cmake/bin/cmake.
The problem now is that there is no way to install CMake like suggested ! The machine does not have any UI to run Android Studio, and the command line tools feature no option to install CMake. And creating sym-links isn't the solution either, as CMake isn't the only thing it's looking for.
How am I supposed to make my project work on the machine ? CMake is running perfectly (as it was already used as part of the tests) so the problem is only coming from Gradle looking only in the SDK directory for it...
The problem now is that there is no way to install CMake like suggested
Actually it is not! Instead of using android list sdk command for installing sdk packages you should use new command line tool: sdk-manager.
Ndk, cmake are available for installing through this new android sdk tool.
you need to install manually cmake on your system unix:
go to your android sdk directory ${ANDROID_HOME} and create new cmake folder with:
wget "https://dl.google.com/android/repository/cmake-3.6.3155560-linux-x86_64.zip"
unzip -q cmake-3.6.3155560-linux-x86_64.zip -d ${ANDROID_HOME}/cmake
add to PATH ENV ${PATH}:${ANDROID_HOME}/cmake/bin

Resources