Changes between Version 1 and Version 2 of ExternalPythonPackages


Ignore:
Timestamp:
Mar 13, 2012, 2:27:50 PM (12 years ago)
Author:
maphew
Comment:

installing and using pip

Legend:

Unmodified
Added
Removed
Modified
  • ExternalPythonPackages

    v1 v2  
    22
    33There 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.
     4
     5Important 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.
     6
     7== pip ==
     8''[http://www.pip-installer.org/ pip]'' is a tool for installing and managing Python packages, such as those found in the [http://pypi.python.org/pypi Python Package Index]. It’s a replacement for `easy_install`.
     9
     10If you don't have it already, install [wiki:pkg-curl], then from the Osgeo4w shell:
     11
     12Install the `distribute` prerequisite and then `pip`:
     13{{{
     14curl http://python-distribute.org/distribute_setup.py | python
     15curl --insecure https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
     16
     17rem Create a batch file to run pip:
     18copy con %osgeo4w_root%\bin\pip.bat
     19%pythonhome%\Scripts\pip.exe %*[ctrl-Z]
     20}}}
     21(recipe adapted from [http://www.pip-installer.org/en/latest/installing.html pip install instructions])
     22
     23Now you can install (or remove) what you're really after:
     24{{{
     25rem ipython - Productive Interactive Computing, a great python shell
     26pip install ipython
     27pip uninstall foobar
     28}}}
     29See [http://www.pip-installer.org/en/latest/usage.html usage] for more possibilities, like installing from a source code repository.
     30
     31It'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).
     32
     33
     34