fresh-cat-90827
12/21/2021, 11:05 PMRequires-Dist
section that may confuse pip
; thread has details.fresh-cat-90827
12/21/2021, 11:06 PMException message: 1 Exception encountered:
ProcessExecutionFailure: Process 'Building project/project-name.pex with 5 requirements: PyYAML, protobuf==3.18.1, .(omitted)., wxpython==4.1.1' failed with exit code 1.
stdout:
stderr:
ERROR: Cannot install package-name==86.0.0 and wxpython==4.1.1 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit <https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies>
pid 84787 -> /Users/username/.cache/pants/named_caches/pex_root/venvs/d2d8d4b12b561145e584265c5ad878096fafd801/4bb26c73fc128134a83e24c67f5efafa8dad1707/pex --disable-pip-version-check --no-python-version-warning --exists-action a --use-feature 2020-resolver --isolated -q --cache-dir /Users/username/.cache/pants/named_caches/pex_root --log /private/var/folders/k0/3nssm8v15r5b08k1k1wyhs2r0000gp/T/process-execution8rMYbu/.tmp/tmpxdQOi6/pip.log download --dest /private/var/folders/k0/3nssm8v15r5b08k1k1wyhs2r0000gp/T/process-execution8rMYbu/.tmp/tmpTvAMiU/macosx_10_15_x86_64-cp-38-cp38 --platform macosx_10_15_x86_64 --implementation cp --python-version 38 --abi cp38 --only-binary :all: --constraint constraints.txt PyYAML protobuf==3.18.1 .(omitted). wxpython==4.1.1 --index-url <https://privatepypi/pypi/simple> --extra-index-url <https://pypi.python.org/simple> --retries 5 --timeout 15 exited with 1 and STDERR:
The conflict is caused by:
package-name 86.0.0 depends on numpy>=1.19.4
wxpython 4.1.1 depends on numpy<1.17; python_version <= "2.7"
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
When I inspect the metadata of the wxpython wheel I see
Requires-Dist: pillow
Requires-Dist: six
Requires-Dist: numpy (<1.17) ; python_version <= "2.7"
Requires-Dist: numpy ; python_version >= "3.0"
I assume this syntax is to say - if you are on Python <=2.7, then please use `numpy`<1.17 otherwise if you are on Python 3, use any numpy
version. However, it looks as if it’s only picking up Python 2.7 condition and completely ignores the Python 3 section.
Oddly enough, if I run the pex_binary
target with ./pants run
, it is able to build the requirements.pex
with those dependencies and the program runs fine. So this happens only when calling ./pants package
.
Does this suggest there may be a bug in pip handling those Requires-Dist
sections and I should visit https://github.com/pypa/pip/issues :)enough-analyst-54434
12/21/2021, 11:35 PMenough-analyst-54434
12/21/2021, 11:41 PMfresh-cat-90827
12/22/2021, 6:53 AM2.6.1
happy-kitchen-89482
12/22/2021, 7:23 AMfresh-cat-90827
12/22/2021, 7:28 AM2.9.0
release 🙂 John has provided some extra flags I have to use to avoid building a local wheelhouse 🙂 please see https://pantsbuild.slack.com/archives/C046T6T9U/p1639514317185300?thread_ts=1636782893.243300&cid=C046T6T9U. I’ll experiment running the commands above in 2.9.1rc1
just to explorefresh-cat-90827
12/22/2021, 8:19 AM2.7.1
happy-kitchen-89482
12/22/2021, 12:25 PM