I'm getting a pip install error when building one ...
# general
a
I'm getting a pip install error when building one of my PEXes. I've set
PEX_VERBOSE=9
in the
__run.sh
, but the error is still not plain to me.
Copy code
pip._internal.exceptions.InstallationSubprocessError: Getting requirements to build wheel exited with 1
There was 1 error downloading required artifacts:secrets<0.9.0,>=0.8.11) :: Resolving requirements from lock file tickets-poetry.lock :: Categorizing 51 downloaded artifacts
1. pyyaml 5.4.1 from https://<internal_company_url>/api/pypi/pypi-virtual/packages/packages/a0/a4/<sha>/PyYAML-5.4.1.tar.gz
Does anyone know how I can preserve even more logs to troubleshoot this? I'm assuming the issue is related to the version of pyyaml (which unfortunately I can't upgrade). I found in a different thread that someone suggested
--preserve-pip-download-log
on the
pex
command inside
__run.sh
, but this isn't producing any additional output, as far as I can tell.
1
I was able to resolve this issue by downgrading PyYAML, fortunately. However, the question still stands. I would have no idea how to troubleshoot further if this didn't work 🙂
b
I think
--preserve-pip-download-log
will mean `pex`'s logging includes a file path that contains the pip log, rather than including it directly in
pex
's logging.
👍 1
The relevant log line may be very hidden while you have
PEX_VERBOSE=9
e
What @broad-processor-92400 says is true, but looking at the text you provided @acoustic-library-86413 is "secrets" an internal project that collides with this?: https://pypi.org/project/secrets/#history or did your org make its own version of that and upload it to your company index?
The PyPI project straight up does not have the version you constrain.
a
secrets
is a modified name in the example I gave, so there shouldn't be any collision issues. I'll try to look for the log file with decreased verbosity level. Thanks for the input everyone. I did try to grep for "log" in the output without any luck initially.
e
Looks like so:
Copy code
$ pex.venv/bin/pex3 lock create cowsay --preserve-pip-download-log > lock.json
pex: Preserving `pip download` log at /tmp/pex-pip-log.6citami6/pip.log
...
h
Based on your previous question about interpreter constraints, I suspect this is related. I recommend constraining to a single interpreter each time (e.g.,
==3.9.2
) and not a range, and certainly not an open-ended range like
>=3.9.2
.
👍 1
a
Fair point, Benjy
Everything is working correctly now with the two versions. But when I get the time tomorrow I'll inspect the pip install log.
h
You don't want pex to attempt to resolve for multiple interpreter versions, when you only care about one.
At best it will take more time, at worse it might fail
👍 1