summaryrefslogtreecommitdiff
path: root/docs/getting.rst
blob: 75b4bae7fcecc16bd078b71f94e8e9191cb2362d (plain)
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
.. _getting:

Installation
============

Pint has no dependencies except Python_ itself. In runs on Python 2.7 and 3.3+.

You can install it (or upgrade to the latest version) using pip_::

    $ pip install -U pint

That's all! You can check that Pint is correctly installed by starting up python, and importing pint:

.. testcode::

    >>> import pint             # doctest: +SKIP
    >>> pint.__version__        # doctest: +SKIP

.. note:: If you have an old system installation of Python and you don't want to
   mess with it, you can try `Anaconda CE`_. It is a free Python distribution by
   Continuum Analytics that includes many scientific packages. To install pint
   from the conda-forge channel instead of through pip use:
       $ conda install -c conda-forge pint

You can check the installation with the following command:

    >>> pint.test()                 # doctest: +SKIP


On Arch Linux, you can alternatively install Pint from the Arch User Repository
(AUR). The latest release is available as `python-pint`_, and packages tracking
the master branch of the GitHub repository are available as `python-pint-git`_
and `python2-pint-git`_.


Getting the code
----------------

You can also get the code from PyPI_ or GitHub_. You can either clone the public repository::

    $ git clone git://github.com/hgrecco/pint.git

Download the tarball::

    $ curl -OL https://github.com/hgrecco/pint/tarball/master

Or, download the zipball::

    $ curl -OL https://github.com/hgrecco/pint/zipball/master

Once you have a copy of the source, you can embed it in your Python package, or install it into your site-packages easily::

    $ python setup.py install



.. _easy_install: http://pypi.python.org/pypi/setuptools
.. _Python: http://www.python.org/
.. _pip: http://www.pip-installer.org/
.. _`Anaconda CE`: https://store.continuum.io/cshop/anaconda
.. _`python-pint`: https://aur.archlinux.org/packages/python-pint/
.. _`python-pint-git`: https://aur.archlinux.org/packages/python-pint-git/
.. _`python2-pint-git`: https://aur.archlinux.org/packages/python2-pint-git/
.. _PyPI: https://pypi.python.org/pypi/Pint/
.. _GitHub: https://github.com/hgrecco/pint