Use pip instead of easy_install to simplify installation of dependencies

Issue #796 resolved
Tiago Henriques
created an issue

The current installation instructions for those running from SVN trunk include the manual installation of every dependency:

These instructions could be made much more concise by switching to pip, Ian Bicking's replacement for easy_install:

The official method of installation for the Pinax project is using pip to install all requirements insider of a virtualenv.

Using pip allows you to specify a requirements file contain each individual requirement (one per line). Another strong advantage is that pip can retrieve and install dependencies directly from revision control. It currently supports Subversion, Mercurial, Git and Bazaar. Here's what my requirements file looks like:

{{{ $ cat satchmo-requirements.txt pycrypto django-registration PyYAML -e hg+ -e svn+ elementtree docutils -e svn+svn:// }}}

Installing these dependencies then is a simple matter of typing:

pip install --requirement satchmo-requirements.txt

Of course, for this to work, you need to have previously installed pip itself (easy_install pip) as well the revision control tools used in the requirements file, in this case Mercurial and Subversion. This is can be easily done with apt-get, !MacPorts or similar.

The only dependencies missing are trml2pdf and sorl. Their respective archives don't contain a, so they have to be installed by hand.

Comments (11)

  1. Anonymous

    One thing is missing in your satchmo-requirements.txt and that would be django itself. The version required by satchmo is trunk so all you need to add would be

    -e svn+

    Another thing worth mentioning here would be the use of virtualenv ( It is a tool that you can use to create a python virtual environment that is very handy if you need to have different versions of the same thing. Having those installed, all you would need to do, would be to create a new virtualenv before running the pip install.

  2. Jakob Larsen

    Since I use virtual environments and thus pip to setup sites, I used some time to track down dependencies in a format that pip can use. I believe I have everything needed in the file attached. I also used the satchmo version here from bitbucket.

  3. Lee Packham

    Maybe I am missing something but the pip installation using:

    -e hg+

    ... doesn't work.

    It ends up creating


    inside of easy-install.pth.

    Any ideas on why that is? The only clue I can find is that satchmo/apps is added as the package in and this might be incorrect?

  4. Lincoln Loop

    Here's an updated requirements file. I'd recommend leaving Satchmo out of it. Your install process becomes:

    1. Install pip
    2. pip install -e hg+
    3. pip install -r src/satchmo/requirements.pip
    4. Profit :)

    I'm having issues with the ReportLab install on OS X at the moment, but it looks like it is a known issue:

    update: just realized the requirements file is missing Django. It should have `django==1.1` as a line in it. Imaging was intentionally left out. I recommend installing it from your distro.

  5. Tiago Henriques reporter

    I tried to use the ImprovedInstallationProcess today to setup a new satchmo installation on my Mac. Using python 2.6.4, I setup a brand new virtualenv, did the incantations and got an error when running

    $ easy_install pip (...) Finished processing dependencies for pip

    $ pip install -r (...) Successfully installed

    $ pip install -e hg+ (...) Successfully installed satchmo

    $ python bin/ (...) ImportError: No module named satchmo_skeleton

    I've checked the installed files, and there's no importable satchmo_skeleton anywhere in the virtualenv. What could be the matter?

  6. Chris Moffitt repo owner

    I think the final issue with this ticket was the handling of the skeleton directory. The latest command allows you to specify the path to it so I'm closing this ticket out. If we have new issues, we'll open a new ticket.

  7. Log in to comment