wiki:ExternalPythonPackages

Version 5 (modified by mlt, 9 years ago) ( diff )

Source migrated https://developer.github.com/changes/2014-04-25-user-content-security/

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 with 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, then from the Osgeo4w shell:

Install the distribute prerequisite and then pip:

curl http://python-distribute.org/distribute_setup.py | python
curl --insecure https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py | python

Create a batch file to run pip:

copy con %osgeo4w_root%\bin\pip.bat
%pythonhome%\Scripts\pip.exe %*[ctrl-Z]

(recipe adapted from pip install instructions)

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.