DataJoint Python Windows Install Guide¶
This document outlines the steps necessary to install DataJoint on windows for use in connecting to a remote server hosting a DataJoint database. Some limited discussion of installing MySQL is discussed in MySQL for Windows, but is not covered in-depth since this is an uncommon usage scenario and not strictly required to connect to DataJoint pipelines.
Quick install steps for advanced users are as follows:
- install latest python 3.x and ensure it is in
PATH(3.6.3 current at time of writing)
- pip install datajoint
For ERD drawing support:
- Install graphviz for windows and ensure it is in
PATH(64 bit builds currently tested; URL below.)
- pip install pydotplus matplotlib
Detailed instructions follow.
Step 1: Install Python¶
Python for Windows is available from:
The latest 64 bit 3.x version, currently 3.6.3, is available from the python site .
From here, run the installer to install python.
For a single-user machine, the regular installation process is sufficient -
be sure to select the
Add Python to PATH option:
For a shared machine, run the installer as administrator (right-click, run as administrator) and select the advanced installation. Be sure to select options as follows:
Step 2: Verify Installation¶
To verify the python installation and make sure that your system
is ready to install datajoint, open a command window by entering
into the windows search bar:
python and the python package manager,
pip can be
verified by running
python -V and
pip -V, respectively:
If you relieve the error message that either
is not a recognized command, please uninstall python and ensure
that the option to add python to the PATH variable was properly
Step 3: Install DataJoint¶
DataJoint (and other python modules) can be easily installed using
pip python package manager which is installed as a part of python
and was verified in the previous step.
To install datajoint simply run
pip install datajoint:
This will proceed to install DataJoint, along with several other required packages from the PIP repository. When finished, a summary of the activity should be presented:
You can find out more about the packages installed and many freely available other open source packages via pypi, the python package index site.
(Optional) Step 4: Install Packages for ERD Support¶
To draw ERD diagrams of your DataJoint schema, the following additional steps should be followed.
DataJoint currently utilizes graphviz to generate the ERD diagrams for DataJoint. Although a windows version of graphviz is available from the main site, it is an older and out of date 32-bit version, and so we recommend using the pre-release builds of the 64 bit version, which are available here:
More specifically, we use the build artifacts from the
Win64; Configuration: Release which are available here .
This is a regular windows installer executable, and will present a dialog when starting:
It is important that an option to place graphviz in the
PATH be selected.
For a personal installation:
To install system wide:
Once installed, graphviz can be verified from a fresh command window as follows:
If you receive the error message that the dot program is not a recognized command, please uninstall graphviz and ensure that the option to add python to the PATH variable was properly configured.
in some cases, running the
dot -c command in a command
prompt is required to properly initialize the graphviz installation.
The pydotplus library links the graphviz installation to DataJoint,
and is easily installed via
The matplotlib library provides useful plotting utilities which are
also used by DataJoint’s ERD drawing facility, and is and is easily
(Optional) Step 5: Install Jupyter Notebook¶
As described on the jupyter.org website:
‘The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text.’
Although not a part of datajoint, jupyter notebook can be a very
useful tool for building and interacting with datajoint pipelines,
and is easily installed from
pip as well:
Once installed, jupyter notebook can be started via the
command, which should now be on your path:
By default, jupyter notebook will start a local private webserver session from the directory where it was started and start a web browser session connected to the session.
From here, you now should be able to use the notebook viewer to navigate the filesystem and use it to create new project folders and interactive jupyter/python/datajoint notebooks.
Git For Windows¶
The Git version control system is not a part of datajoint per-se but can be useful to install for interacting with the broader python/git/github sharing ecosystem.
The git for windows installer is available from https://git-scm.com/download/win
The default settings should be sufficient/correct in most cases.
MySQL for Windows¶
To host pipelines locally, the MySQL server package is required.
MySQL for windows can be installed via the installers available from the MySQL website . Please note that although DataJoint should be fully compatible with a windows MySQL server installation, this mode of operation is not tested by the DataJoint team.