wiki:ExternalPythonPackages

Version 7 (modified by rjlabs, 8 years ago) ( diff )

curl throws: (23) Failed writing body -- that may not be obvious to windows users

External Python Packages

There are any number of python programs which people would like to use with Osgeo4W, but for which there isn't an available package maintainer to create an o4w-specific version. Here are two recipes for installing 3rd party python apps which aren't part of the osgeo4w ecosystem.

Important note: it's up to you to ensure the 3rd party packages can play nice with osgeo4w. If things get too messed up because of conflicting versions or something you may need to remove everything and install from scratch.

Install pip

pip is a tool for installing and managing Python packages, such as those found in the Python Package Index. It’s a replacement for easy_install.

If you don't have it already, install pkg-curl (typically installed by default).
Then:
launch the Osgeo4w shell
change directories to one that you can write to (c:\ may not be writable)
securely download get-pip install script with the following line in the Osgeo4w shell:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

If you get "error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed" see #474.

Install pip:

python get-pip.py

(recipe adapted from pip install instructions)

Install 3rd party program or module

Now you can install (or remove) what you're really after (ipython - Productive Interactive Computing, a great python shell):

pip install ipython
pip uninstall foobar

See usage for more possibilities, like installing from a source code repository.

It's a good idea to run from a temp or scratch directory because a failed build will leave files behind (and a great many of the packages fail).

Use standard Windows installers

If you make Osgeo4W python the system default, you can use the usual windows installers (foobar-setup.exe, .msi). Details for how to do that are at ticket:114, an experimental python program to add and remove o4w python from the Windows registry.

Note: See TracWiki for help on using the wiki.