Skip to content

ETLlib installation FAQ

priyakot edited this page Oct 6, 2014 · 5 revisions
                            **********# ETLlib installation FAQ**********

(Note: Please refer the README.md for installation instructions )

  1. How do I install ETLlib on Ubuntu ?
    Please refer [Installation on Ubuntu](https://github.com/chrismattmann/etllib/wiki/Installation-Instructions-in-
    Ubuntu)

  2. How do I install ETLib with tika support? (reference README.md)
    For Tika support you will need to install tika-python and its
    dependencies first. Once you have that installed, you can install ETLlib with Tika support using the following
    commands:


    The bin directory will be populated with the various command-line tools.
  3. How do I install ETLib on the MacOS without tika support?
    Try installing using the instructions specified in the ReadME.md https://github.com/chrismattmann/etllib
    If the setup fails follow the below instructions:

  1. Verify that you are running in sudo if not then use sudo -s
  2. Setup a virtual python environment(Refer #3), you will get something like this and then install the etl without tika:
    (venv)xyz-MacBook-Pro:bin root# pip install git+https://github.com/chrismattmann/etllib.git
  3. Try the command: tsvtojson
  4. You will get its Usage instructions with a bunch of options
  1. How do I create and setup a python virtual environment?
    Please refer http://docs.python-guide.org/en/latest/dev/virtualenvs/ or
    http://www.pythonforbeginners.com/basics/how-to-use-python-virtualenv
    After that is setup change to the directory containing your virtual env and activate it :
    source venv/bin/activate

  2. If you get the Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.6/site-packages (from etllib==0.0.0.dev-r0) message while installation and it fails, it seems like if you tried installing etl earlier, it might be already present in your python Library site packages. If you do not want to go through the overhead of uninstalling it, you can create a virtual environment and try installing it there.

  3. If you encounter something like ImportError: failed to find libmagic.

    • Check your installation then you need to install the lib magic from https://github.com/ahupp/python-magic#dependencies
    • For MAC users: if you have home-brew installed and you come across "Cowardly refusing to sudo brew install"
      then you need to do the following:
      1. sudo chown root /usr/local/bin/brew
      2. brew install libmagic If you need Python to find the installed site-packages: mkdir -p ~/Library/Python/2.7/lib/python/site-packages echo '/usr/local/lib/python2.7/site-packages' > ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth ==> Summary 🍺 /usr/local/Cellar/libmagic/5.19: 14 files, 3.0M (venv)Priyas-MacBook-Pro:bin root# mkdir -p ~/Library/Python/2.7/lib/python/site-packages (venv)Priyas-MacBook-Pro:bin root# echo '/usr/local/lib/python2.7/site-packages' >
        ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth (venv)Priyas-MacBook-Pro:bin root# ls activate easy_install-2.7 python2 activate.csh pip python2.7 activate.fish pip2 venv activate_this.py pip2.7 easy_install python (venv)Priyas-MacBook-Pro:bin root# tsvtojson tsvtojson: Usage: tsvtojson [-v] [-t tsv file] [-j json file] [-o object type] [-c column headers txt file] [-u unique
        field]
  4. How do I uninstall etllib?

    • Check the default env path of python.
    • Go to the path and go to dist-packages.
    • delete tika or etllib if already exist.
    • delete original directories of the same.
  5. If you don't see python installation directory ("/some/directory" ) getting populated with binary files hence you can't execute the last steps as there are no binary files [ ../../bin/python2.7 setup.py build ../../bin/python2.7 setup.py install ] then check if you have given the absolute path of the directory in the local.cfg file. You can try doing that
    and check again.

Tips:

  • How to skip duplicate entries using etllib? You can use the tsvtojson command with the [-u nameOftheKeyColumn] option to skip records which have a repeated
    key field. (This key is one of the column header key from your colheaders.txt file)

  • Why do I keep getting an Error message : Error detecting encoding for row val: [-] Message: None on running the
    tsvtojson command ? This error message occurs when the encoding format is not specified for the data. To avoid this error add this
    parameter to your tsvtojson command [-e pathoftheEncoding.txtFile] . This file is located in your etl installation
    under the etl folder.

ETLLib Wiki

ETLLib — mung, then load.

Source and issues

Website

Start here

Old

Python 2.7, buildout, and bootstrap.py notes live under Old. Original URLs still resolve via stubs.

Clone this wiki locally