To run Pants, you need:
- Linux or macOS.
- Python 3.6+ discoverable on your
- Internet access (so that Pants can fully bootstrap itself).
Python 2 compatibility
Pants requires Python 3.6+ to run itself, but it can build Python 2 code.
Issues discovering your Python interpreter?
You likely have a non-standard Python installation. Pants expects to find both
pythonand one of
PATH. Ensure that you have these binaries installed by running
which python3.6(or equivalent).
We've found pyenv to be a useful tool for installing specific Python versions in a uniform manner.
Pants is invoked via a launch script named
<<pantscmd>> , saved at the root of the repository.
First, set up a minimal
pants.toml config file to instruct the script to download the latest 1.30.x release:
printf '[GLOBAL]\npants_version = "1.30.1"\nbackend_packages = \n' > pants.toml
Then, download the script:
curl -L -o <<pantscmd>> https://pantsbuild.github.io/setup/pants && \ chmod +x <<pantscmd>>
Some Linux distributions may need additional packages
On Ubuntu you may need to:
apt install -y python3-dev python3-distutils
Now, run this to bootstrap Pants and to verify the version it installs:
"Too many open files" error?
See Troubleshooting for how to fix this. (We're working on a long-term fix this.)
<<pantscmd>>to version control
This will allow all users in the project to use Pants without having to install it themselves.
Updated about 3 years ago