[GIS] Link QGIS to Anaconda Python Distribution: Spyder, iPython Notebook, pip, scikit-learn

anacondaipythonpythonqgisspyder

I have Anaconda as my primary Python distro, and want to route Python related QGIS scripts through it. With Anaconda, I have Spyder, can easily install packages with pip, and can launch a iPython Notebook web-browser for both screen shares and storing code I intend to execute on my data before, during, and after manipulations in QGIS (which calls on packages such as scikit-learn).

I can not find any useful anywhere on how to link the two.

I'm using Windows 8.1, but if this can only be done in Linux, I can try to set it up on my desktop, which is running Mint 13. I just need to have a webcam and mic, found on my laptop but not desktop at the moment, for an interactive demo and interview on Tues.

Best Answer

On Windows, your best option is currently to use the Python distribution that can be installed through OSGeo4W and install pip through the OSGeo4W installer, too.

While pip cannot install many packages that require linkage to external libraries (e.g. netCDF or GEOS) right from the package index, a workaround is to install these unofficial pre-compiled binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/ and install them in the OSGeo4W Shell through pip install path-to-downloaded-binary.whl.

[Edit 2018] Now there is also the option to install QGIS via (Ana)conda:

conda install -c conda-forge qgis