I'm trying to install spaCy using pip install spacy
but I'm getting the following error ..
I have VS 2015 installed, and I have the following Python install ..
3.5.2 |Anaconda 2.5.0 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]
I tried the following SO solutions to no avail ..
- command cl.exe failed upon pip install django_compressor
- error: command 'cl.exe' failed: No such file or directory
As well as various others. This is not a unique problem to this specific library but more generally anytime I try to install Python libraries that need C to build on Windows.
In my case I need to install more tools from Visual Studio (I'm using VS 2017 Community and Python 3.6.4). I installed those tools (see installer screenshot here):
Desktop development with C++: I included all defaulted items and the next ones:
Linux development with C++
Then I opened the Windows PowerShell as Administrator privilegies (Right click to open) and move folder of Visual Studio installation and find that path:
Then I executed this file:
After that I use pip as normal, for instance, I wanted to install Mayavi:
I hope that it helps someone too.
This is easily the simplest solution. For those who don't know how to do this:
Install the C++ compiler http://landinghub.visualstudio.com/visual-cpp-build-tools
Go to the installation folder (In my case it is): C:\Program Files (x86)\Microsoft Visual C++ Build Tools
Open Visual C++ 2015 x86 x64 Cross Build Tools Command Prompt
Type:
pip install package_name
I had come across this problem many times. There is
cl.exe
but for some strange reasonpip
couldn't find it, even if we run the command from thebin
folder wherecl.exe
is present. Try using conda installer, it worked fine for me.As you can see in the following image,
pip
is not able to find thecl.exe
. Then I tried installing using condaAnd to my surprise it gets installed without an error once you have the right version of vs cpp build tools installed, i.e. v14.0 in the right directory.
Refer to this link:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#cytoolz
Download the right whl package for you python version(if you have trouble knowing what version of python you have, just lunch the interpreter )
use pip to install the package, assuming that the file is in downloads folder and you have python 3.6 32 bit :
python -m pip install C:\Users\%USER%\Downloads\cytoolz‑0.9.0.1‑cp36‑cp36m‑win32.whl
this is not valid for just this package, but for any package that cannot compile under your own windows installation.
For example: conda install -c conda-forge spacy
I was facing the same problem with visual studio 2017.
you can find cl.exe in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86.
just set the environment variable as the able address and run the command in anaconda, it worked for me.