Cant update CMake on Windows - windows

I have tried downloading the installer from the CMake website, and installing with choco install cmake.
After refreshing my powershell with refreshenv I still get the old version of CMake. I have tried adding the path to my powershell profile.
Is it because it comes with Visual Studio?
How do I update it?

Related

Visual Studio 2017 path issue while installing tensorflow in Anaconda

The exact error that I get when I try to run the environment after attempting to install Keras/ TensorFlow via the Anaconda prompt.
I am unable to install Keras or TensorFlow using Anaconda anymore. Even activating the environment results in a couple of errors as shown above. I have tried installing the Visual studio build tools 2019 (and 2017 using the community Visual Studio setup). Please advise on what I could try next to get rid of this error.
How did you install Anaconda and which OS are you using?
It seems Anaconda has not installed properly in your system. Uninstall and remove the previous Anaconda from your system and try reinstalling the Anaconda.
You can follow this reference to install Anaconda and Tensorflow in your system.
Check this link to install Visual studio.

Qt 5.8 msvc 2015 compile error

I have installed Qt using an offline installer qt-opensource-windows-x86-msvc2015_64-5.8.0. I have visual studio community edition 2017 installed with c++ build tools. because it's compiler was incompatible with the qt version, then I installed visual c++ build tools 2015 from http://landinghub.visualstudio.com/visual-cpp-build-tools . When I try to compile a project it gives an error :-1: error: LNK1158: cannot run 'rc.exe'. Heres how my qt kit looks like,
Can someone figure out whats the mistake and how to fix it.
Thanks.
I've fixed this both on my own machine and on several co-workers machines.
It tends to happen when you have both Visual Studio 2015 and VS 2017 installed. Or more precisely, multiple versions of the Windows SDK installed. When that happens, the vcvars32.bat script (located in your Visual Studio install dir) does not correctly add the location of the resource compiler (rc.exe) to your PATH. Thus, QT Creator runs vcvars32.bat (as specified in Qt Creator under Option->Build&Run->Compilers, but the tools directory for the Windows SDK Kit isn't properly added to the PATH environment.
The simple fix is to add the appropriate version of RC.exe to your path.
Do this from the command line:
cd "c:\program files(x86)"
dir /s rc.exe
You'll get several versions (x86 and x64) and for several versions of the SDK. Add the PATH for where rc.exe lives for the version that corresponds to the SDK and build flavor to your vcvars32.bat startup script.
For example:
PATH="C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86";%PATH%
Restart Qt Creator and that should fix it.
Another fix that worked for me is to uninstall all versions of Visual Studio (and all those side installs of SQL, Windows SDKs, dev tools, etc...). Reboot. Then cleanly install VS 2017 again. Then cleanly uninstall and re-install all of Qt again. That seemed to work for me. A wonderful way to spend an afternoon.
If you update to Qt 5.9 it supports MSVC 2017. However, if you want to get it working with 5.8, I believe you might be missing the Windows SDK. You can download the SDK from Microsoft for Windows 7, 8 or 10, just get whichever version is appropriate for you.
With some googling I found a couple of other somewhat related solutions here, & here, and I've summed them up below:
If you've already got the SDK or installed it and it still doesn't work, it appears that copying rc.exe and rcdll.dll from the WindowsSDK folder to your MSVS installs \VC\bin folder may fix the problem. You might also try copying those same two files to Qt's \Qt*version number**compiler version*\bin.

Installation : Microsoft Visual C++ Redistributable stuck at 'Processing: Windows7_MSU_X64'

I'm trying to install the package of Microsoft Visual C++ Redistributable as my xampp apache module cannot be installed. The installation take a very long time to complete. What should I do? Is this common and is all I have to do is wait?
They are dead stuck with this setup progress as the indication
Processing: Windows7_MSU_X64
To install the Visual C++ 2015 Redistributable, you do not need to remove or uninstall the previous versions.
Refer to the error message, you can have a look at the installation log file and search ‘error’, if you can find the error message about Windows6.1-KB2999226-x64.msu, check this similar issue and have a try with the following to troubleshot this issue:
Download the update KB2999226 for your OS edition from here: Update for Universal C Runtime in Windows and before it, since your OS is windows 7, make sure SP1 is installed.
Manually install the KB2999226 as below:
Find the Windows6.1-KB2999226-x64.msu from the folder C:\ProgramData\Package Cache\xxxxx\packages\Patch\x64, which you can the path from the installation log
Create a folder named ‘XXXX’ in that and execute following commands from Admin command prompt
wusa.exe Windows6.1-KB2999226-x64.msu /extract:XXXX
DISM.exe /Online /Add-Package /PackagePath:XXXX\Windows6.1-KB2999226-x64.cab
vc_redist.x64.exe /repair
If you have no idea about the installation log, you can go to %temp% and order by ‘Date modified’, then you should find the installation log, or you can use http://aka.ms/vscollect to gather the installation logs. After using it, you will find vslogs.zip under %temp% folder then upload the file to https://onedrive.live.com/ and share the link here.
I first tried a clean boot and that didn't work so I opened up the task manager to see what other processes I might kill while it was stuck at "Processing: Windows7_MSU_X64" I killed the process titled "windows update standalone installer" and the install completed successfully the moment I killed that process.
Okay, I found the solution for my stucked installation. I updated my Windows manually using wsusoffline tools as my Windows can't seem to update with the usual ways.
Install wsusoffline and select all update for Windows (Windows 7 for me). Make sure to choose the folder to save your update.
Wait for the update to be downloaded
Install the update
Install the MV C++ Redistributable again
Done!
I finally can install my Xampp Apache module and access to the localhost.

npm config set C compiler not to vcbuild.exe

When trying to npm install a node project in a Windows7 machine I am suffering from the inglorious error message:
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.
Because I am under Cygwin I have already installed gcc ($ gcc -v and $ g++ -v respond in both Cygwin and cmd).
How can I tell npm to use gcc to compile instead of the vcbuild.exe that I don't have installed?
Note: I have already tried node-gyp and it did not work.
Note2: I know for sure the code runs without problems in linux.
Here is what sorted out my problem and the steps that I took to reach the long-awaited solution:
Installed Visual Studio Community but the VCBuild.exe was not there still.
Installed Microsoft Build Tools 2015 and tried to install the affected module as: npm install bcrypt --msvs_version=2015 but I got the following error:
error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution".
My last shot was to install Visual Studio Express for Desktop and after npm install bcrypt --msvs_version=2015 I manage to npm install and npm start my app in Windows7!!
Lastly I uninstalled Visual Studio Community and Microsoft Build Tools 2015.
Note I had to remove the bcrypt module from the dependencies in package.json and install it as npm install bcrypt --msvs_version=2015 inside my app folder.

How to find the typescript version that I'm using through CLI?

I installed typescript 1.7.4 via Visual Studio 2015. In Visual Studio I see that I installed version 1.7.4.
When I run the command tsc --version, I get 1.0.3.0, but not 1.7.4.
How can I find which version of Typescript installed through command line interface?
Run the command where tsc you will know where the 1.0.3.0 version is located, then you can remove it by whatever means. If you then install tsc using npm it will install the latest version (1.7.5 at the time of this writing).
I think you can check you environment path.Make sure C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7 is in it.

Resources