bitter-ability-32190
07/07/2022, 6:36 PMpip
inside of the venv
for a package in my PEX_ROOT
? I upgraded system pip
, but the pip
inside the venv
doesn't seem to mirror it. ( which aligns with `venv`s)
Specifically, installing cryptography
is failing, and I think a newer pip would bypass the build and download built wheels?enough-analyst-54434
07/07/2022, 6:42 PM$ pex-tools /dev/null venv -h
usage: pex-tools PATH venv [-h] [--scope {all,deps,srcs}] [-b {false,prepend,append}] [-f] [--collisions-ok] [-p] [--copies] [--compile] [--prompt PROMPT] [--rm {pex,all}] [--emit-warnings] [--pex-root PEX_ROOT] [--disable-cache] [--cache-dir CACHE_DIR] [--tmpdir TMPDIR]
[--rcfile RC_FILE]
PATH
Creates a venv from the PEX file.
positional arguments:
PATH The directory to create the virtual environment in.
options:
-h, --help show this help message and exit
--scope {all,deps,srcs}
The scope of code contained in the Pex that is installed in the venv. By defaultall code is installed and this is generally what you want. However, in some situations it's beneficial to split the venv installation into deps and srcs steps. This is
particularly useful when installing a PEX in a container image. See <https://pex.readthedocs.io/en/latest/recipes.html#pex-app-in-a-container> for more information. (default: all)
-b {false,prepend,append}, --bin-path {false,prepend,append}
Add the venv bin dir to the PATH in the __main__.py script. (default: false)
-f, --force If the venv directory already exists, overwrite it. (default: False)
--collisions-ok Don't error if population of the venv encounters distributions in the PEX file with colliding files, just emit a warning. (default: False)
-p, --pip Add pip to the venv. (default: False)
You should be able to use that pip to upgrade itself to any version you like.bitter-ability-32190
07/07/2022, 6:43 PMHow did you get a pip in your venv in the PEX_ROOT?This is through Pants, so whatever Pants PEX incantations
enough-analyst-54434
07/07/2022, 6:43 PM./pants export
?enough-analyst-54434
07/07/2022, 6:44 PM--pip
otherwise - Pants should be using immutable things.bitter-ability-32190
07/07/2022, 6:44 PMflake8
resolve, and on CI when trying to build the PEX it's started to build cryptographybitter-ability-32190
07/07/2022, 6:46 PMProcessExecutionFailure: Process 'Building flake8.pex from 3rdparty/python/lockfiles/flake8.lock' failed with exit code 1.
/home/buildagent/.cache/pants/named_caches/pex_root/venvs/s/3663269c/venv/bin/python3.8 /home/buildagent/.cache/pants/named_caches/pex_root/venvs/s/3663269c/venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /home/buildagent/.cache/pants/named_caches/pex_root/tmp/pip-build-env-3oef15hl/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i <https://pypi.org/simple/> -- 'poetry>=0.12'
Wonder why its trying to pex up poetry 😐enough-analyst-54434
07/07/2022, 6:46 PMpip
in your venvs under the PEX_ROOT. Are you referring to the pip
pex
uses to build your PEX? That's a vendored pip
and you cannot upgrade it.bitter-ability-32190
07/07/2022, 6:47 PM/home/buildagent/.cache/pants/named_caches/pex_root/venvs/s/3663269c/venv/lib/python3.8/site-packages/pip
doens't look like vendored pip to me 🤔bitter-ability-32190
07/07/2022, 6:47 PMpoetry
need to get involved 😮enough-analyst-54434
07/07/2022, 6:48 PMbitter-ability-32190
07/07/2022, 6:48 PMbitter-ability-32190
07/07/2022, 6:48 PMenough-analyst-54434
07/07/2022, 6:48 PMbitter-ability-32190
07/07/2022, 6:48 PMpoetry
bitter-ability-32190
07/07/2022, 6:48 PMenough-analyst-54434
07/07/2022, 6:50 PMbitter-ability-32190
07/07/2022, 6:50 PMbitter-ability-32190
07/07/2022, 6:51 PMenough-analyst-54434
07/07/2022, 6:51 PMenough-analyst-54434
07/07/2022, 6:51 PMenough-analyst-54434
07/07/2022, 6:52 PMenough-analyst-54434
07/07/2022, 6:54 PM--preserve-pip-download-log
?bitter-ability-32190
07/07/2022, 7:09 PMenough-analyst-54434
07/07/2022, 7:26 PMenough-analyst-54434
07/07/2022, 7:27 PMbitter-ability-32190
07/07/2022, 7:27 PMbitter-ability-32190
07/07/2022, 7:27 PMbitter-ability-32190
07/07/2022, 7:28 PMenough-analyst-54434
07/07/2022, 7:31 PMenough-analyst-54434
07/07/2022, 7:31 PMbitter-ability-32190
07/07/2022, 7:32 PMbitter-ability-32190
07/07/2022, 7:32 PMcore
backend I suspectenough-analyst-54434
07/07/2022, 7:33 PMenough-analyst-54434
07/07/2022, 7:38 PMpoetry>=0.12
as the sole requirement.
pex3 lock create --python python3.8 --resolver-version pip-2020-resolver "poetry>=0.12" --indent 2 -o lock.json
And I find the cryptography needed is 37.0.4 which is satisfied by cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl in my case. What is the arch of the CI machine?bitter-ability-32190
07/07/2022, 7:39 PMenough-analyst-54434
07/07/2022, 7:39 PMbitter-ability-32190
07/07/2022, 7:39 PMbitter-ability-32190
07/07/2022, 7:40 PMenough-analyst-54434
07/07/2022, 7:40 PMenough-analyst-54434
07/07/2022, 7:40 PMbitter-ability-32190
07/07/2022, 7:40 PMpyproject.toml
on that branch. lets see what happensenough-analyst-54434
07/07/2022, 7:40 PMenough-analyst-54434
07/07/2022, 7:42 PMenough-analyst-54434
07/07/2022, 7:43 PMenough-analyst-54434
07/07/2022, 7:44 PMbitter-ability-32190
07/07/2022, 7:49 PMpyproject.toml
workedbitter-ability-32190
07/07/2022, 7:49 PM