Geek as a platform

Problems installing IPython Notebook in Cygwin (W7)

While trying to "pip install ipython[notebook]" in my Cygwin installation (W7), I got this error due to libzmq:

 Collecting ipython[notebook]


 Running install for pyzmq


gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration 
-DZMQ_USE_POLL=1 -DHAVE_LIBSODIUM=1 -Ibundled/zeromq/include -Ibundled -Ibundled/libsodium/src/libsodium/include 
-Ibundled/libsodium/src/libsodium/include/sodium -I/usr/include/python3.4m -c bundled/zeromq/src/address.cpp 
-o build/temp.cygwin-2.0.4-i686-3.4/bundled/zeromq/src/address.o

gcc: error: spawn: No such file or directory
error: command 'gcc' failed with exit status 1


Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-l4nkh9zq/pyzmq/';
exec(compile(getattr(tokenize,'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" 
install --record /tmp/pip-jicpjqak-record/install-record.txt --single-version-externally-managed --compile" 
failed with error code 1 in /tmp/pip-build-l4nkh9zq/pyzmq

It took me a while to figure it out... In case you were in a similar situation, this is what I did:

1) Install some tools (via apt-cyg or setup.exe)

apt-cyg install libtool automake autoconf   

(you will need the usual tools for compiling C/C++ code, such as gcc,g++,make, etc,etc)


export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

3) Download and compile libsodium

make && make install

4) Download and compile libzmq

make && make install

5) Finally, try to install ipython[notebook] again:

pip install ipython[notebook]

It worked for me... Hope it helps you.