Skip to content

Instantly share code, notes, and snippets.

@wickman
Created April 12, 2012 22:54
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save wickman/2371630 to your computer and use it in GitHub Desktop.
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
Copy link

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

./pants.bootstrap

Before pants would work.

@mateor
Copy link

mateor 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!

@BoHuang-ecr
Copy link

I got this error:

Exception message: Package SourcePackage('file:///..user../.cache/pants/plugins/cffi-1.11.1.tar.gz') is not translateable by ChainedTranslator(WheelTranslator, EggTranslator, SourceTranslator)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment