Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
installing Pants

Installing / troubleshooting pants

Requirements

Most of the commons python environment has been developed against CPython 2.6. Things mostly work with CPython 2.7 and recent efforts have been made to improve CPython 3.x and PyPy compatibility. We've explicitly ignored anything prior to CPython 2.6 and in fact generally discourage use against anything less than CPython 2.6.5 as there are known bugs that we're unwilling to fix. We've never even tried running against Jython or IronPython so if that's your environment, you're on your own.

If none of this made any sense to you, run python -V. If it says Python 2.6.x or Python 2.7.x you're probably fine.

TL;DR

$ git clone git://github.com/twitter/commons && cd commons
$ ./pants

Troubleshooting

TypeError: unpack_http_url() takes exactly 4 arguments (3 given)

If you see this error, it means that your installation is attempting to use a cached version of pip 1.0.2 instead of pip 1.1.

Solution:

$ rm -rf .python
$ rm -f pants.pex
$ ./pants

TypeError: __init__() got an unexpected keyword argument 'platforms'

If you see this error, you're running an old pants.pex against a new BUILD file.

Solution:

$ rm -f pants.pex
$ ./pants

AttributeError: 'NoneType' object has no attribute 'rfind'

If you see this error, you're running an old pants.pex against a new BUILD file.

Solution:

$ rm -f pants.pex
$ ./pants

Almost any problem

Almost any problem can be solved by fully clearing out all caches and rebuilding pants:

$ build-support/python/clean.sh
$ git clean -fdx build-support
$ ./pants
@cliffmcc

This comment has been minimized.

Copy link

commented Feb 14, 2014

After cloning from the Git repo, I had to run:

./pants.bootstrap

Before pants would work.

@mateor

This comment has been minimized.

Copy link

commented Feb 28, 2014

second the assertion requiring ./pants.bootstrap, it complained about the Required pants.ini key DEFAULT.pants_version is not present with the initial ./pants command.

Thanks for the great docs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.