Hey guys, I have an issue with getting pants to bo...
# general
b
Hey guys, I have an issue with getting pants to bootstrap on the first command.First I installed the pants using curl (1st option in “Installation” in the docs. Then I removed it as I thought it might have been installed wrong (maybe I messed up the PATH var 🤷 ) and installed it again using Homebrew. Didn’t help. Whenever I type in
pants tailor ::
or just simple
pants
it starts to bootstrap but fails and I am not sure why as the errors are not really documented. First I thought it could be an issue with M1 mac, but my colleague ran it successfully on the first try. Any help would be amazing! Log in thread.
Copy code
Bootstrapping Pants 2.16.0 using cpython 3.9.16
Installing pantsbuild.pants==2.16.0 into a virtual environment at /Users/jan/Library/Caches/nce/aeded33e4c...e/bindings/venvs/2.16.0
  Preparing metadata (setup.py) ... done
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  Building wheel for psutil (setup.py) ... error
  ERROR: Failed building wheel for psutil
  error: subprocess-exited-with-error

  × Running setup.py install for psutil did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  Running setup.py install for psutil ... error
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> psutil

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Install failed: Command '['/Users/jan/Library/Caches/nce/aede...e/bindings/venvs/2.16.0/bin/python', '-sE', '-m', 'pip', '--disable-pip-version-check', '--no-python-version-warning', '--log', '/Users/jan/Library/Caches/nce/aede...bf2e/bindings/venvs/2.16.0/pants-install.log', 'install', '--quiet', '--find-links', '<https://wheels.pantsbuild.org/simple/>', '--progress-bar', 'off', 'pantsbuild.pants==2.16.0']' returned non-zero exit status 1.
More information can be found in the log at: /Users/jan/Library/Caches/nce/aed...2e/bindings/logs/install.log

Error: Isolates your Pants from the elements.

Please select from the following boot commands:

scie-pants
bootstrap-tools
pants
pants-debug
update

You can select a boot command by passing it as the 1st argument or else by setting the SCIE_BOOT environment variable.

ERROR: Failed to establish atomic directory /Users/jan/Library/Caches/nce/aeded33e4c5a...e. Population of work directory failed: Boot binding command failed: exit status: 1
d
Seems like the
wheel
pip package is missing in the environment that is used to boostrap Pants.
pip install wheel
should do
b
Do you mean installing
wheel
to my global python? That doesn’t seem to change anything. What seems weird to me is that Pants is using a CPython version that I don’t even have on my system. I’ve got 3.9.13 but it uses 3.9.16. I’ve got 3.11 (which we use in our codebase) set as my global version.
r
pants
binary (scie-pants) comes with its own python which it uses to bootstrap itself.
e
Note the find-links of https://wheels.pantsbuild.org/simple/ - that does not contain the 3rdparty wheels Pants uses. This used to be setup up slightly differently, but the end result was a find-links that pointed off to an S3 bucket with pre-built wheels for all 3rdparty deps Pants uses for all platforms it supports. Python Build Standalone, the interpreter scie-pants ships with, does not support building sdists, which you often need to do for Mac arm; so this seems like a bug that will be affecting ~everyone using Mac arm at the very least.
If the old S3 bucket exists then this is a simple fix to add in a 2nd --find-links. If not and they got blown away, they'll need to be re-created for ~all Pants versions.
h
@boundless-oyster-62723 can you try an earlier version:
Copy code
curl --proto '=https' --tlsv1.2 -fsSL <https://static.pantsbuild.org/setup/get-pants.sh> | bash -s -- --version 0.8.2
1
(this is just an earlier version of the launcher script, the version of Pants itself is determined by your pants.toml, as before)
b
Well, this S3 bucket being used for hosting pants-built wheels of other people's code specifically for Mac was definitely not something made obvious from the code. Only goes to show just how convoluted Pants release process used to be. This isn't a problem in our new distribution model (2.18+, I have a draft blog post written) because users consume pre-built artifacts with everything baked in (a PEX).
So, yeah, stopgap is using an older version
scie-pants
until we post a bugfix. As a longer solution, I'm working towards getting off bespoke systems (especially ones we pay for, since we lost of primary sponsor). In this case, I don't see why we can't backport the PEX-per-release to older versions, much like I backported the release notes and the wheels. I'll propose it ASAP
b
@happy-kitchen-89482 That older version worked, thanks!
so this seems like a bug that will be affecting ~everyone using Mac arm at the very least.
I thought this would be the issue. I am not sure whether my colleague did something beforehand that caused his M1 arm Mac to run successfully on the first try. However we both used the same process. For me the older version of launcher script worked.
b
I don't use Mac, but I suspect if you had the necessary tools to compile the source dists, things would succeed
e
That should not be possible, PBS has bad sysconfig and should not be able to build sdists for native distributions on Mac, Linux, any PBS platform.
b
It has hardocded values, yes, but if your system is able to use those values you luck out. We recently saw this with a user, who was able to compile hdrhistogram after installing clang (the compiled referenced by PBS's siteconfig)
e
Ah, ok. That makes sense but still seems surprising. The paths I remember were gnarly and very unlikely to match anything.