Installation

Pint has no dependencies except Python itself. In runs on Python 2.6 and 3.0+.

You can install it using pip:

$ pip install pint

or using easy_install:

$ easy_install pint

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

>>> import pint
>>> pint.__version__
0.5

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.

You can check the installation with the following command:

>>> pint.test()

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

Logo

About Pint

Units in Python. You are currently looking at the documentation of version 0.5.2.

Other Formats

You can download the documentation in other formats as well:

Useful Links

Table Of Contents

Related Topics

Fork me on GitHub