wide-zoo-86070
03/07/2022, 7:49 PM./pants --version
, I see the following error
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/virtualenv/
ERROR: Could not find a version that satisfies the requirement virtualenv==20.4.7 (from -r requirements.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for virtualenv==20.4.7 (from -r requirements.txt (line 1))
.pex/venvs/32a5dda4259a11b7add428d3f3e5656078dd2fe0/f28b3dbba3c9dae1b4357adde5b079b8b3ca9fac/pex --disable-pip-version-check --no-python-version-warning --exists-action a --use-deprecated legacy-resolver --isolated -q --cache-dir .pex download --dest /tmp/tmpwm2e_tsu/data.user.miniconda3.bin.python3.7 --requirement requirements.txt --index-url <https://pypi.org/simple> --retries 5 --timeout 15
Is there a way to pass other --index-url?polite-garden-50641
03/07/2022, 8:11 PM<https://static.pantsbuild.org/setup/pants>
polite-garden-50641
03/07/2022, 8:11 PMpolite-garden-50641
03/07/2022, 8:11 PMwhich python3
polite-garden-50641
03/07/2022, 8:14 PMwide-zoo-86070
03/08/2022, 3:23 PM./pants --version
. Any idea?
$ ./pants --version
10:20:17.38 [INFO] Initializing scheduler...
10:20:17.58 [ERROR] no path specified
polite-garden-50641
03/08/2022, 3:33 PMwide-zoo-86070
03/08/2022, 4:15 PM./pants --version -ldebug
11:13:46.93 [DEBUG] acquiring lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f88d6dacfa0>
11:13:46.93 [DEBUG] purging metadata directory: /Users/xxx/PycharmProjects/example-python2/.pids/9da86e233ee0/pantsd
11:13:46.93 [DEBUG] Launching pantsd
11:13:46.93 [DEBUG] purging metadata directory: /Users/xxx/PycharmProjects/example-python2/.pids/9da86e233ee0/pantsd
11:13:46.94 [DEBUG] pantsd command is: PANTS_DAEMON_ENTRYPOINT=pants.pantsd.pants_daemon:launch_new_pantsd_instance PYTHONPATH=/Users/xxx/.pex/venvs/314154c5afbb5a405f8ada71e9f4ce8270c35f57/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055:/opt/anaconda3/lib/python38.zip:/opt/anaconda3/lib/python3.8:/opt/anaconda3/lib/python3.8/lib-dynload:/Users/xxx/.pex/venvs/s/e2898bd6/venv/lib/python3.8/site-packages: /Users/xxx/.pex/venvs/s/e2898bd6/venv/bin/python3.8 /Users/xxx/.pex/venvs/314154c5afbb5a405f8ada71e9f4ce8270c35f57/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/pex --version -ldebug
11:13:48.18 [DEBUG] pantsd is running at pid 62545, pailgun port is 57750
11:13:48.18 [DEBUG] releasing lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f88d6dacfa0>
11:13:48.18 [DEBUG] Connecting to pantsd on port 57750
11:13:48.19 [DEBUG] Connecting to pantsd on port 57750 attempt 1/3
11:13:48.19 [DEBUG] Connected to pantsd
11:13:48.21 [DEBUG] Launching 1 roots (poll=false).
11:13:48.22 [DEBUG] computed 1 nodes in 0.010648 seconds. there are 7 total nodes.
11:13:48.32 [INFO] Initializing scheduler...
11:13:48.33 [DEBUG] File handle limit is: 10000
11:13:48.52 [DEBUG] Changes to /Users/xxx/.pex/venvs/314154c5afbb5a405f8ada71e9f4ce8270c35f57/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055, outside of the buildroot, will not be invalidated.
11:13:48.52 [DEBUG] Changes to /Users/xxx/.pex/venvs/314154c5afbb5a405f8ada71e9f4ce8270c35f57/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055, outside of the buildroot, will not be invalidated.
11:13:48.52 [DEBUG] Changes to /opt/anaconda3/lib/python38.zip, outside of the buildroot, will not be invalidated.
11:13:48.52 [DEBUG] Changes to /opt/anaconda3/lib/python3.8, outside of the buildroot, will not be invalidated.
11:13:48.52 [DEBUG] Changes to /opt/anaconda3/lib/python3.8/lib-dynload, outside of the buildroot, will not be invalidated.
11:13:48.52 [DEBUG] Changes to /Users/xxx/.pex/venvs/s/e2898bd6/venv/lib/python3.8/site-packages, outside of the buildroot, will not be invalidated.
11:13:48.52 [DEBUG] Changes to /Users/xxx/PycharmProjects/example-python2, outside of the buildroot, will not be invalidated.
11:13:48.52 [ERROR] no path specified
polite-garden-50641
03/08/2022, 4:18 PMpolite-garden-50641
03/08/2022, 4:18 PMwide-zoo-86070
03/08/2022, 4:20 PM# Copyright 2020 Pants project contributors.
# Licensed under the Apache License, Version 2.0 (see LICENSE).
[GLOBAL]
pants_version = "2.9.0+git4dcb7437"
backend_packages.add = [
"pants.backend.python",
"pants.backend.python.lint.docformatter",
"pants.backend.python.lint.black",
"pants.backend.python.lint.flake8",
"pants.backend.python.lint.isort",
"pants.backend.python.typecheck.mypy",
]
# This will become the default in 2.11, and is only explicitly set to not break
# backwards-compatibility for existing users. If you are setting up Pants for
# the first time, set this to false.
use_deprecated_python_macros = false
[anonymous-telemetry]
enabled = true
repo_id = "3B1D361B-E9F1-49A8-B761-03DCC41FD58E"
[source]
# The Python source root is the repo root. See <https://www.pantsbuild.org/docs/source-roots>.
root_patterns = ["/"]
[python]
# The default interpreter constraints for code in this repo. Individual targets can override
# this with the `interpreter_constraints` field. See
# <https://www.pantsbuild.org/docs/python-interpreter-compatibility>.
#
# It's usually a good idea to pin this to a particular version, e.g. `==3.9.*`. We only use a range
# so that this example works on many different machines.
#
# If you use Apple Silicon, set to a value like `>=3.9`.
interpreter_constraints = [">=3.7"]
# Use a constraints file. See <https://www.pantsbuild.org/docs/python-third-party-dependencies>.
requirement_constraints = "constraints.txt"
[python-bootstrap]
# We search for interpreters on both on the $PATH and in the `$(pyenv root)/versions` folder.
# If you're using macOS, you may want to leave off the <PATH> entry to avoid using the
# problematic system Pythons. See
# <https://www.pantsbuild.org/docs/python-interpreter-compatibility#changing-the-interpreter-search-path>.
search_path = ["<PATH>", "<PYENV>"]
It is basically the one in example-python except the pants_version.polite-garden-50641
03/08/2022, 4:58 PMhundreds-father-404
03/08/2022, 5:32 PM--venv
modehundreds-father-404
03/08/2022, 5:33 PMwide-zoo-86070
03/08/2022, 6:15 PMwide-zoo-86070
03/08/2022, 6:46 PM$ ./pants --version -ldebug
env: python3.7: No such file or directory
hundreds-father-404
03/08/2022, 6:47 PMpython3.8 ./pants.pex
or python3.9 ./pants.pex
? That is, do not rely on the shebangwide-zoo-86070
03/08/2022, 6:49 PMpython3.9 ./pants --no-verify-config --version
13:49:44.54 [INFO] Initialization options changed: reinitializing scheduler...
13:49:45.04 [INFO] Scheduler initialized.
2.8.0+gitc6fa199e
wide-zoo-86070
03/08/2022, 6:50 PMwide-zoo-86070
03/08/2022, 6:51 PMwide-zoo-86070
03/08/2022, 6:53 PMhundreds-father-404
03/08/2022, 6:55 PM--venv
because that gives you the fastest performance.
Re the shebang, we were hardcoding python3.7 which wasn't very helpful. The first two fixes in https://github.com/pantsbuild/pants/issues/11954 improve that so you should be able to run ./pants.pex
and it work if you don't have python3.7 installedwide-zoo-86070
03/15/2022, 9:42 PMhundreds-father-404
03/15/2022, 9:44 PMhundreds-father-404
03/16/2022, 10:14 PM