1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
Installation
============
.. _intro_installation:
Getting Started
---------------
This package is available from the `Python Package Index
<http://pypi.python.org/pypi/petl>`_. If you have `pip
<https://pip.pypa.io/>`_ you should be able to do::
$ pip install petl
You can also download manually, extract and run ``python setup.py
install``.
To verify the installation, the test suite can be run with `pytest
<https://docs.pytest.org/>`_, e.g.::
$ pip install pytest
$ pytest -v petl
:mod:`petl` has been tested with Python versions 2.7 and 3.6-3.13
under Linux, MacOS, and Windows operating systems.
.. _intro_dependencies:
Dependencies and extensions
---------------------------
This package is written in pure Python and has no installation requirements
other than the Python core modules.
Some domain-specific and/or experimental extensions to :mod:`petl` are
available from the petlx_ package.
.. _petlx: http://petlx.readthedocs.org
Some of the functions in this package require installation of third party
packages. These packages are indicated in the relevant parts of the
documentation for each file format.
Also is possible to install some of dependencies when installing `petl` by
specifying optional extra features, e.g.::
$ pip install petl['avro', 'interval', 'remote']
The available extra features are:
db
For using records from :ref:`Databases <io_db>` with `SQLAlchemy`.
Note that is also required installing the package for the desired database.
interval
For using :ref:`Interval transformations <transform_intervals>`
with `intervaltree`
avro
For using :ref:`Avro files <io_avro>` with `fastavro`
pandas
For using :ref:`DataFrames <io_pandas>` with `pandas`
numpy
For using :ref:`Arrays <io_numpy>` with `numpy`
xls
For using :ref:`Excel/LO files <io_xls>` with `xlrd`/`xlwt`
xlsx
For using :ref:`Excel/LO files <io_xlsx>` with `openpyxl`
xpath
For using :ref:`XPath expressions <io_xml>` with `lxml`
bcolz
For using :ref:`Bcolz ctables <io_bcolz>` with `bcolz`
whoosh
For using :ref:`Text indexes <io_whoosh>` with `whoosh`
hdf5
For using :ref:`HDF5 files <io_pytables>` with `PyTables`.
Note that also are additional software to be installed.
remote
For reading and writing from :ref:`Remote Sources <io_remotes>` with `fsspec`.
Note that `fsspec` also depends on other packages for providing support for
each protocol as described in :class:`petl.io.remotes.RemoteSource`.
|