Hi All -- I am struggling to get pants installed ...
# general
a
Hi All -- I am struggling to get pants installed on my Mac M1 .. any ideas on how to resolve ..
Copy code
[~/pants]$ /bin/bash -c "$(curl -fsSL <https://static.pantsbuild.org/setup/one_step_setup.sh>)"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1176k  100 1176k    0     0  4468k      0 --:--:-- --:--:-- --:--:-- 4632k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   162  100   162    0     0    465      0 --:--:-- --:--:-- --:--:--   465
100 19427  100 19427    0     0  46206      0 --:--:-- --:--:-- --:--:-- 46206
Bootstrapping Pants using /Users/xyz/.pyenv/shims/python3.9
Creating the virtualenv PEX.
Downloading the Pex PEX.
SHA256 fingerprint of <https://github.com/pantsbuild/pex/releases/download/v2.1.103/pex> verified.
Installing pantsbuild.pants==2.14.0 into a virtual environment at /Users/xyz/.cache/pants/setup/bootstrap-Darwin-arm64/2.14.0_py39
Traceback (most recent call last):
  File "/Users/xyz/.cache/pants/setup/bootstrap-Darwin-arm64/pants.Spxdr9/install/bin/pip", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip._internal'
c
Huh… I don’t repro this issue..
Copy code
╭─ zsh  ~/tmp/testsetup                                                                                                                                                                                                              09:04:11 
╰─❯ /bin/bash -c "$(curl -fsSL <https://static.pantsbuild.org/setup/one_step_setup.sh>)"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1176k  100 1176k    0     0  2007k      0 --:--:-- --:--:-- --:--:-- 2046k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   162  100   162    0     0    853      0 --:--:-- --:--:-- --:--:--   853
100 19427  100 19427    0     0  62778      0 --:--:-- --:--:-- --:--:-- 62778
09:04:51.07 [INFO] Initializing scheduler...
09:04:51.12 [INFO] Scheduler initialized.
09:04:51.13 [WARN] Please either set `enabled = true` in the [anonymous-telemetry] section of pants.toml to enable sending anonymous stats to the Pants project to aid development, or set `enabled = false` to disable it. No telemetry sent for this run. An explicit setting will get rid of this message. See <https://www.pantsbuild.org/v2.14/docs/anonymous-telemetry> for details.

Pants was installed successfully!
here’s my pyenv setup:
Copy code
╰─❯ pyenv versions
  system
* 3.7.13 (set by /Users/andreas.stenius/.pyenv/version)
* 3.8.13 (set by /Users/andreas.stenius/.pyenv/version)
* 3.9.13 (set by /Users/andreas.stenius/.pyenv/version)
╭─ zsh  ~/tmp/testsetup                                                                                                                                                                                                              09:05:56 
╰─❯ which python
/Users/andreas.stenius/.pyenv/shims/python
h
For me, I install it using
pipx
(on M1 as well as Intels).
e
@average-exabyte-61568 if you change just the URL in your command line to https://raw.githubusercontent.com/pantsbuild/scie-pants/main/get-pants.sh that might work for you. The get-pants script uses scie-pants which is a new native self-contained launcher that uses a hermetic interpreter for M1.
Currently experimental, but, as far as we can tell, solid. A bit faster than the
./pants
script too.
💯 1