OS - Windows-10
node - v8.12.0
npm - 6.4.1
The command I'm using (run as administrator):
npm install --global --production --verbose windows-build-tools
> windows-build-tools#5.2.2 postinstall C:\Users\winuser\AppData\Roaming\npm\node_modules\windows-build-tools
> node ./dist/index.js
Downloading vs_BuildTools.exe
[============================================>] 100.0% of 1.12 MB (1.12 MB/s)
Downloaded vs_BuildTools.exe. Saved to C:\Users\winuser\.windows-build-tools\vs_BuildTools.exe.
Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!
Status from the installers:
---------- Visual Studio Build Tools ----------
2021-11-23T15:34:08 : Verbose : [InstalledProductsProviderImpl]: Stream was closed
2021-11-23T15:34:08 : Verbose : [InstallerImpl]: Rpc connection was closed.
2021-11-23T15:34:08 : Verbose : [InstallerImpl]: Stream was closed
2021-11-23T15:34:09 : Verbose : Completed notifying all clients that the update is starting
2021-11-23T15:34:09 : Verbose : Updating installer [bootstrapperArguments: -- /finalizeInstall install --in C:\ProgramData\Microsoft\VisualStudio\Packages\_bootstrapper\vs_setup_bootstrapper_202111231533560643.json --norestart --quiet --includeRecommended --add Microsoft.VisualStudio.Workload.VCTools --locale en-US --activityId 61b330e5-53cf-4d1e-819c-b2acdd48ed03]
------------------- Python --------------------
Python 2.7.18 is already installed, not installing again.
It doesn't comes out, have tried to install couple of times. In both the times it looks stuck at same point.
The following command tried, it installed but was showing Could not install Visual Studio Build Tools.
npm install --global --production windows-build-tools#4.0.0
Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!
Status from the installers:
---------- Visual Studio Build Tools ----------
Successfully installed Visual Studio Build Tools.
---------- Visual Studio Build Tools ----------
Successfully installed Visual Studio Build Tools.
------------------- Python --------------------
Python 2.7.18 is already installed, not installing again.
Could not install Visual Studio Build Tools.
Please find more details in the log files, which can be found at
C:\Users\winuser\.windows-build-tools
Can anybody help me?
You should install visual studio manually and select .NET and C/C++ components during setup. I had the same problem and that worked out for me.
Related
I'm trying to install cargo-tree on my Windows machine. It uses Windows 10, Visual Studio build tools 15. This is my active rustup toolchain:
active toolchain
----------------
stable-x86_64-pc-windows-msvc (default)
rustc 1.26.0 (a77568041 2018-05-07)
When running cargo install cargo-tree, the build fails. The build log ends with:
error: failed to run custom build command for `libssh2-sys v0.2.7`
process didn't exit successfully: `C:\Users\NICOLA~1\AppData\Local\Temp\cargo-installt7F5FM\release\build\libssh2-sys-726b9e90a2ed2b95\build-script-build` (exit code: 101)
--- stderr
fatal: not a git repository (or any of the parent directories): .git
thread 'main' panicked at '
couldn't determine visual studio generator
if VisualStudio is installed, however, consider running the appropriate vcvars script before building this crate
', C:\Users\nicolas-delsaux\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.31\src\lib.rs:552:25
note: Run with `RUST_BACKTRACE=1` for a backtrace.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-tree v0.18.0`, intermediate artifacts can be found at `C:\Users\NICOLA~1\AppData\Local\Temp\cargo-installt7F5FM`
According to some documentation I found on the web, it seems to be related to some vcvars script to invoke, and an older Visual Studio version to install. I don't fully understand what to do so
Should I install an older version of Visual Studio?
Do I have some script to run?
According to #user25064, this requires installing the command through developer command prompt (and, more specifically, the developer command prompt for your architecture - take attention to x86/x64 architectures)
I am trying to install Spacy on windows 10 which is of 64 bit. I have Python 3.6.4 64 bit, Visual Studio 14 is installed. but I am getting below error, I have added Image as well of the error
Error code:
`error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe' failed with exit status 2
So I tried couple of thing to resolve this Error, finally I had to create an Conda environment and try installing spacy in conda environment with Python 3.6 version which was successful.
or trying downloading Visual studio Build tools for 17(Visual C++ 17 is required for Python 3,6 version), which may resolve this problem.
Thanks.
Download required python module from here and run:
pip install file_name.whl
pip install pycrypto works fine with python3.5.2 but fails with python3.6 with the following error:
inttypes.h(26): error C2061: syntax error: identifier 'intmax_t'
The file include\pyport.h in Python installation directory does not have #include < stdint.h > anymore. This leaves intmax_t undefined.
A workaround for Microsoft VC compiler is to force include stdint.h via OS environment variable CL:
Open command prompt
Setup VC environment by runing vcvars*.bat (choose file name depending on VC version and architecture)
set CL=-FI"Full-Path\stdint.h" (use real value for Full-Path for the environment)
pip install pycrypto
I've succeeded install pycrypto 2.6.1 on python 3.6, Windows 10, Visual Studio 2017.
Open "x86_x64 Cross-Tools Command Prompt for VS 2017" with administrator privilege in start menu.
set CL=-FI"%VCINSTALLDIR%Tools\MSVC\14.11.25503\include\stdint.h"
pip install pycrypto
Thanks to user1960422's answer.
PowerShell steps for pycrypto 2.6.1 (via simple-crypt) / Python 3.6 / Windows 10:
$env:VCINSTALLDIR="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"
$env:CL="-FI`"$env:VCINSTALLDIR\INCLUDE\stdint.h`""
Successful simple-crypt / pycrypto install
I also needed to follow the answer in: https://stackoverflow.com/a/24822876/8751739 to fix a winrandom module error.
Use PyCryptodome instead of pycrypto. pycrypto is discontinued and is no longer actively supported. PyCryptodome exposes almost the same API as pycrypto (source).
I've succeeded install pycrypo 2.6.1 on python 3.6 and windows 10.
Set an environment variable like below.
Open cmd.exe
Activate virtualenv
Download pycrypto 2.6.1 release from github and unzip it.
set an environment variable for pycrypto
set CL=/FI"%VCINSTALLDIR%\\INCLUDE\\stdint.h" %CL%
Run setup command
python setup.py install
my result is here
I would be glad if this could be help someone.
Uninstall your current Python version
Install Python for amd64 architecture
Follow the other accepted solutions:
open "x86_x64 Cross-Tools Command Prompt for VS 2017"
Add the new enviroment varible for your Visual Studio MSVC install path
set CL=-FI"%VCINSTALLDIR%Tools\MSVC\14.11.25503\include\stdint.h"
pip install pycrypto
For ppl who is encountering same situation as mine:
Env
Windows 10 Enterprise v10.0.18363 Build 18363
Python 3.8
Steps
Download Microsoft C++ Build Tools at https://visualstudio.microsoft.com/visual-cpp-build-tools/
Run above setup exe and install default components
MSVC v142 - VS 2019 C++ x64/x86 build tools
Windows 10 SDK
C++ CMake tools for windows
Testing tools core features - Build Tools
C++ AddressSanitizer(Experimental)
Reboot PC
Start menu > x64 Native Tools Command Prompt for VS 2019, a cmd window will pop up
Execute set CL=-FI"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\include\stdint.h"
Run pip install pycrypto in a cmd window(may need admin privilege)
For me this fixes it:
with Python 2, I have
sudo apt-get install python-dev \
build-essential libssl-dev libffi-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
...
with Python 3, I need
sudo apt-get install python3 python-dev python3-dev \
build-essential libssl-dev libffi-dev \
...
Installing python-dev python3-dev fixes it for me!
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build>vcvars64.bat
** Visual Studio 2019 Developer Command Prompt v16.11.14
** Copyright (c) 2021 Microsoft Corporation
********************************************************************** [vcvarsall.bat] Environment initialized for: 'x86_x64'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools>set
CL=-FI"C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\stdint.h"
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools>pip
install pycrypto Collecting pycrypto Using cached
pycrypto-2.6.1.tar.gz (446 kB) Preparing metadata (setup.py) ...
done Building wheels for collected packages: pycrypto Building wheel
for pycrypto (setup.py) ... done Created wheel for pycrypto:
filename=pycrypto-2.6.1-cp39-cp39-win_amd64.whl size=528832
sha256=250926fc0e06b4c1ed9c2fb16ad9b4723984ef68c1e5383b26c974235536a0ae
Stored in directory:
c:\users\volka\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local\pip\cache\wheels\9d\29\32\8b8f22481bec8b0fbe7087927336ec167faff2ed9db849448f
Successfully built pycrypto Installing collected packages: pycrypto
Successfully installed pycrypto-2.6.1
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools>
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.
I am running Node.js 0.10.36 on my windows 7 machine. I also have grunt v0.4.5 and grunt-cli v0.1.13 installed. Python is 2.7.3 and Microsoft Visual studio is 2012.
I am trying to install aglio globally. The command I run is
npm install -g aglio
The error returned is as follows
I have been searching the internet for a good resolution to this, but I'm running out of things to try. The main suggestions were to install Python (which I've done) and to set Microsoft Visual Studio to 2012 (which I've also done).