How to Install CKAN 1.8 on Windows

digisus edited this page Jun 28, 2013 · 1 revision

It is possible to run CKAN on Windows, both version 1.8 and 2.0

If you are mandated by your place of work to use Windows, the good news is that CKAN 1.8 runs very well on Windows. Running CKAN inside Eclipse with PyDev makes for a responsive and effective development environment that is easy to get up and running with.

2.0 will also run, but requires some subtle "hacks" that may not be worth patching until the core codebase settles down a bit in the near future.

The following instructions have only been tested on Windows Vista, but should work on all versions.

Install Python Environment.

  1. Install Python 2.7.3 for Windows:
  2. Install Setuptools Win32-py27 for Windows:
  3. Add c:\Python27\Scripts to the Windows path
  4. Open a new DOS prompt and run easy_install pip

Setup up a PostgreSQL test database:

  1. Install the latest version of PostgreSQL for windows
  2. Run PGAdmin III (Start, Programs, Postgres 9.1, PGAdmin III)
  3. click in "Object browser" on Postgres 9.1 and enter password previously set.
  4. Right click on "Login roles" and select "New Login Role..."
  5. Role name is "ckanuser", set a password, default privileges. Click Ok.
  6. Right click on "Databases" and select "New Database..."
  7. Name is "ckantest" and Owner is "ckanuser". Encoding should be UTF8. Click Ok.

Ensure that you can run CKAN 1.8 on Windows with the bare necessities.

  1. Install the Windows distribution of psycopg2 for Python 2.7: This is the Python library for PostgreSQL
  2. Pip install virtualenv
  3. Optional: Install virtualenvwrapper-win
  4. Optional: Do not place your source code inside your virtual environments, or you'll "de-virtualize" it. Instead, create eg a Sources folder in home directory put pull all your git code there. Virtualenvwrapper will make it easy for you to work with source code anywhere so your don't mix your development code and your virtualenvs
  5. Clone the main branch into your Sources directory
  6. mkvirtualenv --system-site-packages ckan1.8env
  7. git clone
  8. Have a look at the tags with git tag -l and find 1.8 (1.8.1 looks to be identical so just grab 1.8)
  9. Optional: Depending on your workflow, you may like to create your own working branch with git checkout -b ckan-1.8-peder
  10. Activate your virtual environment.
  11. While in source folder run pip install -r pip-requirements.txt
  12. If you are behind proxy and e git+ gives you trouble, you may have to install it manually.
  13. Now install ckan with > python develop or install from your ckan source folder.

Follow the instructions from the CKAN Administrators Manual to setup the database and run CKAN with Paste Script

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.