high-energy-55500
10/29/2021, 12:52 PMpantsbuild.pants
. i’m on a clean M1 Pro macbook pro with barely anything installed so far (essentially just homebrew, pyenv, poetry, and python):
martim@Argon allpdl % poetry install
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
• Installing pantsbuild.pants (2.7.0): Failed
RuntimeError
Unable to find installation candidates for pantsbuild.pants (2.7.0)
at ~/.poetry/lib/poetry/installation/chooser.py:72 in choose_for
68│
69│ links.append(link)
70│
71│ if not links:
→ 72│ raise RuntimeError(
73│ "Unable to find installation candidates for {}".format(package)
74│ )
75│
76│ # Get the best link
martim@Argon allpdl % ./pants -V
Bootstrapping Pants using /Users/martim/.pyenv/shims/python3
Installing pantsbuild.pants==2.7.0 into a virtual environment at /Users/martim/.cache/pants/setup/bootstrap-Darwin-arm64/2.7.0_py38
created virtual environment CPython3.8.10.final.0-64 in 140ms
creator CPython3Posix(dest=/Users/martim/.cache/pants/setup/bootstrap-Darwin-arm64/pants.317fyy/install, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/martim/Library/Application Support/virtualenv)
added seed packages: pip==21.1.2, setuptools==57.0.0, wheel==0.36.2
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Requirement already satisfied: pip in /Users/martim/.cache/pants/setup/bootstrap-Darwin-arm64/pants.317fyy/install/lib/python3.8/site-packages (21.1.2)
Collecting pip
Using cached pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.1.2
Uninstalling pip-21.1.2:
Successfully uninstalled pip-21.1.2
Successfully installed pip-21.3.1
ERROR: Could not find a version that satisfies the requirement pantsbuild.pants==2.7.0 (from versions: 0.0.17, 0.0.18, 0.0.20, 0.0.21, 0.0.22, 0.0.23, 0.0.24, 0.0.25, 0.0.26, 0.0.27, 0.0.28, 0.0.29, 0.0.30, 0.0.31, 0.0.32, 0.0.33, 0.0.34, 0.0.35, 0.0.36, 0.0.37, 0.0.38, 0.0.39, 0.0.40, 0.0.41, 0.0.42, 0.0.43, 0.0.44, 0.0.45, 0.0.46, 0.0.47, 0.0.48, 0.0.49, 0.0.50, 0.0.51, 0.0.52, 0.0.53, 0.0.54, 0.0.55, 0.0.56, 0.0.57, 0.0.58, 0.0.59, 0.0.60, 0.0.61, 0.0.62, 0.0.63, 0.0.64, 0.0.65, 0.0.66, 0.0.67, 0.0.68, 0.0.69, 0.0.70, 0.0.71, 0.0.72, 0.0.73, 0.0.74, 0.0.75, 0.0.76, 0.0.77, 0.0.79, 0.0.80, 0.0.81, 0.0.82, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0)
ERROR: No matching distribution found for pantsbuild.pants==2.7.0
any clue what the issue might be? 😕astonishing-london-2419
10/29/2021, 12:53 PMhigh-energy-55500
10/29/2021, 12:56 PMmartim@Argon allpdl % pip -V
pip 21.1.1 from /Users/martim/.pyenv/versions/3.8.10/lib/python3.8/site-packages/pip (python 3.8)
martim@Argon allpdl % pip install --upgrade pip
Requirement already satisfied: pip in /Users/martim/.pyenv/versions/3.8.10/lib/python3.8/site-packages (21.1.1)
Collecting pip
Using cached pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.1.1
Uninstalling pip-21.1.1:
Successfully uninstalled pip-21.1.1
Successfully installed pip-21.3.1
martim@Argon allpdl % pip -V
pip 21.3.1 from /Users/martim/.pyenv/versions/3.8.10/lib/python3.8/site-packages/pip (python 3.8)
martim@Argon allpdl % ./pants -V
Bootstrapping Pants using /Users/martim/.pyenv/shims/python3
Installing pantsbuild.pants==2.7.0 into a virtual environment at /Users/martim/.cache/pants/setup/bootstrap-Darwin-arm64/2.7.0_py38
...
ERROR: No matching distribution found for pantsbuild.pants==2.7.0
martim@Argon allpdl % poetry install
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
• Installing pantsbuild.pants (2.7.0): Failed
RuntimeError
...
hundreds-father-404
10/29/2021, 2:46 PMhigh-energy-55500
10/29/2021, 7:35 PMpyenv global 3.8.10
. this causes a problem with pants since it tries to use 3.8 instead of 3.9 (python@3.9
was installed using homebrew and python3.9
is available)
we’ll look into adding support for python 3.9, but is there an easy way to set the default python version to 3.8 while still allowing pants to use python3.9?hundreds-father-404
10/29/2021, 7:46 PM./pants
bash script. You can set the env var PYTHON
to be something like python3.9
to force it to use py39. This will mean that Pants should install on your machine
• what interpreter Pants uses to run your code, which is controlled by [python-setup].interpreter_constraints
. You can set the env var PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS='["==3.9.*']
to use Py39 on your machine while coworkers stick to 3.8high-energy-55500
10/29/2021, 8:07 PMhundreds-father-404
10/29/2021, 8:08 PMhigh-energy-55500
10/29/2021, 8:09 PMhundreds-father-404
10/29/2021, 8:10 PMhigh-energy-55500
10/29/2021, 8:10 PM