The answer to why I was finally motivated to put a blog up again is pelican. How to make this work on dreamhost was the question, though. Thankfully, it was a simple matter of following the steps from Geoff Gimse at his blog, with a 5 post series on why and how he was able to put Pelican into work. I will reproduce his steps here for the sake of my future reference.

You can check the DreamHost wiki on Python for some ways to get Python to work on your shared host - Virtualenv, Building a custom version, Automatic Installation, SWIG - I didn't tried other than Geoff's suggestion: pyenv/python-virtualenv, which worked very well for me following some instructions from the bash:

  1. Install pyenv.

  2. Install the pyenv virtual plugin.

  3. Set up tmp folder and install Python 2.7.5

    • Well, why don't I install Python 3 you may be asking. From the pelican 3.3.0 install instructions site:

      Pelican currently runs best on Python 2.7.x; earlier versions of Python are not supported. There is provisional support for Python 3.3, although there may be rough edges, particularly with regards to optional 3rd-party components.

    • Since user doesn't have permission to /var/foo/bar/tmp folder, you will have a "BUILD FAILED" error. Make sure you create a tmp folder in your home folder and tell pyenv to use it on the installation. This is something between what the wiki tells and a comment from yawningsky on Geoff's blog:

      $ export TMPDIR="~/tmp"
      $ pyenv install 2.7.5
      python-build: TMPDIR=~/tmp is set to a non-accessible location

      Full path (or using the $HOME env) works:

      $ export TMPDIR="/home/username/tmp"
      $ pyenv install 2.7.5
    • Keep this TMPDIR env var export in mind in case you want to install new versions of Python

    • I don't remember waiting too much for this, but it can sure take a while (or a loooong while) on a DreamHost shared account. TIP: go drink some coffee
    • This will install setuptools and pip
  4. Create a virtualenv for pelican

    pyenv virtualenv 2.7.5 pelican-venv
    • Quoting Geoff:

      This creates a separate shell from your base python 2.7.5 installation just for your pelican installation. Is it required? No. Do I like to use it? Yes! It keeps the components separate and easily managed.

  5. Switch to your pelican shell via pyenv.

    pyenv shell pelican-venv
    • Any module or component you install will now be installed in the pelican-venv instead of the base 2.7.5 install.
  6. Install pelican

    pip install pelican
  7. Enjoy!

    • For scripts, the executable can be found in ~/.pyenv/versions/pelican-venv/bin/pelican