Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Download and install Python.

  2. Install a Python package manager (we recommend pip).

  3. Install the ComCare Data Export tool.

  4. Create an Excel Query File.

  5. Write a command-line query to run the export.

  6. (Optionally) Configure export to be re-run automatically.

  7. Use data.

Expand
titleCLICK TO EXPAND

Install DET on Windows

The Data Export tool is installed by using the pip install commcare-export command.

Install Python

Visit the Python for Windows page and download the latest version of Python.

Install pip

Installation is straightforward if your local machine has a recent version of Python installed because the package installer, pip, will already be installed. 

You can check whether pip is installed by running the following in the command-line interpreter:

Code Block
C:\Python39>python -m pip --version

Install commcare-export

Code Block
C:\Python39\scripts>pip install commcare-export

Upgrade commcare export

Code Block
C:\python39\scripts>pip install -U commcare-export

Install DET on MacOS

The Data Export tool is installed by using the pip install commcare-export command.

Install Python

For MacOS make sure that your Python installation is upgraded to the latest version. The best way to install software on a Mac is via Homebrew. You need to open a terminal and run two scripts to install Homebrew and the latest version of Python. 

Open a terminal and run the following two commands. 

  1. The first script installs Homebrew. 

  2. The second script installs Python and any prerequisites.  

Code Block
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install python

For Homebrew, use the following:

Code Block
brew install <SOME PACKAGE>.

Install commcare-export

Code Block
pip2 install commcare-export

Upgrade commcare-export

Code Block
sudo pip2 install -U commcare-export

Panel
panelIconIdatlassian-warning
panelIcon:warning:
bgColor#EAE6FF

 NOTE: If you have any problems setting up Python on MacOS, use this reference:

http://docs.python-guide.org/en/latest/starting/install/osx/

Install DET on Linux

The Data Export tool is installed by using the pip install commcare-export command.

Install Python

If you are on a Linux-based operating system, you probably have an automatic package manager available. You probably already have Python installed, but if not, then you will need to invoke the package manager for your operating system. Here are some possible commands to run in the command-line interpreter:

Code Block
$ apt-get install python

or

Code Block
$ yum install python

or

Code Block
$ emerge python

Install pip

Code Block
$ sudo easy_install pip

Install commcare-export

Code Block
$ sudo pip install commcare-export

Upgrade commcare-export

Code Block
$ sudo pip install -U commcare-export
Panel
panelIconIdatlassian-warning
panelIcon:warning:
bgColor#EAE6FF

NOTE: If you get an error "ValueError: Invalid column index 0" you should run this command to downgrade one of the python libraries:

$ pip install -U openpyxl==1.8.6

Run a CommCare Export

Once you have all the components ready, you can run the commcare-export command. 

...