19.1. Installation

19.1.1. Installation on OSX/Linux
19.1.2. Installation on Windows
[Note]Note

The Neo4j database itself (from the Community Edition) is included in the neo4j-embedded distribution.

19.1.1. Installation on OSX/Linux

Prerequisites

[Caution]Caution

Make sure that the entire stack used is either 64bit or 32bit (no mixing, that is). That means the JVM, Python and JPype.

First, install JPype:

  1. Download the latest version of JPype from http://sourceforge.net/projects/jpype/files/JPype/.
  2. Unzip the file.
  3. Open a console and navigate into the unzipped folder.
  4. Run sudo python setup.py install

JPype is also available in the Debian repos:

sudo apt-get install python-jpype

Then, make sure the JAVA_HOME environment variable is set to your jre or jdk folder, so that JPype can find the JVM.

[Note]Note

Installation can be problematic on OSX. See the following Stack Overflow discussion for help: http://stackoverflow.com/questions/8525193/cannot-install-jpype-on-os-x-lion-to-use-with-neo4j

Installing neo4j-embedded

You can install neo4j-embedded with your python package manager of choice:

sudo pip install neo4j-embedded
sudo easy_install neo4j-embedded

Or install manually:

  1. Download the latest appropriate version of JPype from http://sourceforge.net/projects/jpype/files/JPype/ for 32bit or from http://www.lfd.uci.edu/~gohlke/pythonlibs/ for 64bit.
  2. Unzip the file.
  3. Open a console and navigate into the unzipped folder.
  4. Run sudo python setup.py install

19.1.2. Installation on Windows

Prerequisites

[Warning]Warning

It is imperative that the entire stack used is either 64bit or 32bit (no mixing, that is). That means the JVM, Python, JPype and all extra DLLs (see below).

First, install JPype:

[Note]Note

Notice that JPype only works with Python 2.6 and 2.7. Also note that there are different downloads depending on which version you use.

  1. Download the latest appropriate version of JPype from http://sourceforge.net/projects/jpype/files/JPype/ for 32bit or from http://www.lfd.uci.edu/~gohlke/pythonlibs/ for 64bit.
  2. Run the installer.

Then, make sure the JAVA_HOME environment variable is set to your jre or jdk folder. There is a description of how to set environment variables in the section called “Solving problems with missing DLL files”.

[Note]Note

There may be DLL files missing from your system that are required by JPype. See the section called “Solving problems with missing DLL files” for instructions for how to fix this.

Installing neo4j-embedded

  1. Download the latest version from http://pypi.python.org/pypi/neo4j-embedded/.
  2. Run the installer.

Solving problems with missing DLL files

Certain versions of Windows ship without DLL files needed to programmatically launch a JVM. You will need to make IEShims.dll and certain debugging dlls available on Windows.

IEShims.dll is normally included with Internet Explorer installs. To make windows find this file globally, you need to add the IE install folder to your PATH.

  1. Right click on "My Computer" or "Computer".
  2. Select "Properties".
  3. Click on "Advanced" or "Advanced system settings".
  4. Click the "Environment variables" button.
  5. Find the path varible, and add C:\Program Files\Internet Explorer to it (or the install location of IE, if you have installed it somewhere else).

Required debugging dlls are bundled with Microsoft Visual C++ Redistributable libraries.

If you are still getting errors about missing DLL files, you can use http://www.dependencywalker.com/ to open your jvm.dll (located in JAVA_HOME/bin/client/ or JAVA_HOME/bin/server/), and it will tell you if there are other missing dlls.