pipenv
pipenv copied to clipboard
pytorch issue with --index and package requirement constraints
- pipenv version: 2024.4.0
- Fedora: 41
- Python: 3.11
Issue description
I try installing PyTorch on my laptop using Pipenv, but it always throws errors.
pipenv install torch~=2.5.1 --index https://download.pytorch.org/whl/test/xpu
- Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[[source]]
url = "https://download.pytorch.org/whl/test/xpu"
verify_ssl = true
name = "downloadpytorch"
[packages]
opencv-python = "*"
torch = {version = "~=2.5.1", index = "downloadpytorch"}
[dev-packages]
[requires]
python_version = "3.11"
Describe the issue briefly here.
Expected result
I expect torch to be installed using pipenv install as it is when I use pip directly, e.g.:
$ pipenv run pip install torch~=2.5.1 --index-url https://download.pytorch.org/whl/test/xpu
Looking in indexes: https://download.pytorch.org/whl/test/xpu Collecting torch~=2.5.1 Downloading https://download.pytorch.org/whl/test/xpu/torch-2.5.1%2Bxpu-cp311-cp311-linux_x86_64.whl (851.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 851.9/851.9 MB 39.9 MB/s eta 0:00:00 Collecting filelock (from torch~=2.5.1) Downloading https://download.pytorch.org/whl/test/filelock-3.13.1-py3-none-any.whl (11 kB) Collecting typing-extensions>=4.8.0 (from torch~=2.5.1) Downloading https://download.pytorch.org/whl/test/typing_extensions-4.12.2-py3-none-any.whl (37 kB) Collecting networkx (from torch~=2.5.1) Downloading https://download.pytorch.org/whl/test/networkx-3.3-py3-none-any.whl (1.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 43.0 MB/s eta 0:00:00 Collecting jinja2 (from torch~=2.5.1) Downloading https://download.pytorch.org/whl/test/Jinja2-3.1.4-py3-none-any.whl (133 kB) Collecting fsspec (from torch~=2.5.1) Downloading https://download.pytorch.org/whl/test/fsspec-2024.6.1-py3-none-any.whl (177 kB) Collecting pytorch-triton-xpu==3.1.0 (from torch~=2.5.1) Downloading https://download.pytorch.org/whl/test/pytorch_triton_xpu-3.1.0-cp311-cp311-linux_x86_64.whl (315.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 315.6/315.6 MB 42.9 MB/s eta 0:00:00 Collecting sympy==1.13.1 (from torch~=2.5.1) Downloading https://download.pytorch.org/whl/test/sympy-1.13.1-py3-none-any.whl (6.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 MB 48.4 MB/s eta 0:00:00 Collecting packaging (from pytorch-triton-xpu==3.1.0->torch~=2.5.1) Downloading https://download.pytorch.org/whl/test/packaging-22.0-py3-none-any.whl (42 kB) Collecting mpmath=1.1.0 (from sympy==1.13.1->torch~=2.5.1) Downloading https://download.pytorch.org/whl/test/mpmath-1.3.0-py3-none-any.whl (536 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 kB 24.7 MB/s eta 0:00:00 Collecting MarkupSafe>=2.0 (from jinja2->torch~=2.5.1) Downloading https://download.pytorch.org/whl/test/MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28 kB) Installing collected packages: mpmath, typing-extensions, sympy, packaging, networkx, MarkupSafe, fsspec, filelock, pytorch-triton-xpu, jinja2, torch Successfully installed MarkupSafe-2.1.5 filelock-3.13.1 fsspec-2024.6.1 jinja2-3.1.4 mpmath-1.3.0 networkx-3.3 packaging-22.0 pytorch-triton-xpu-3.1.0 sympy-1.13.1 torch-2.5.1+xpu typing-extensions-4.12.2Actual result
$ pipenv install torch~=2.5.1 --index https://download.pytorch.org/whl/test/xpu
Pipfile.lock not found, creating...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed!
⠦ Locking packages...False
<console width=235 ColorSystem.TRUECOLOR>
Traceback (most recent call last):
File "/home/adriano.vieira/.local/bin/pipenv", line 8, in <module>
sys.exit(cli())
~~~^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/cli/options.py", line 52, in main
return super().main(*args, **kwargs, windows_expand_args=False)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/cli/command.py", line 207, in install
do_install(
~~~~~~~~~~^
state.project,
^^^^^^^^^^^^^^
...<14 lines>...
skip_lock=state.installstate.skip_lock,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/routines/install.py", line 285, in do_install
do_init(
~~~~~~~^
project,
^^^^^^^^
...<6 lines>...
categories=pipfile_categories,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/routines/install.py", line 694, in do_init
handle_lockfile(
~~~~~~~~~~~~~~~^
project,
^^^^^^^^
...<8 lines>...
categories=categories,
^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/routines/install.py", line 175, in handle_lockfile
handle_missing_lockfile(project, system, allow_global, pre, pypi_mirror)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/routines/install.py", line 233, in handle_missing_lockfile
do_lock(
~~~~~~~^
project,
^^^^^^^^
...<3 lines>...
pypi_mirror=pypi_mirror,
^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/routines/lock.py", line 67, in do_lock
venv_resolve_deps(
~~~~~~~~~~~~~~~~~^
packages,
^^^^^^^^^
...<10 lines>...
extra_pip_args=extra_pip_args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 907, in venv_resolve_deps
c = resolve(cmd, st, project=project)
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 771, in resolve
raise RuntimeError("Failed to lock Pipfile.lock!")
RuntimeError: Failed to lock Pipfile.lock!
When possible, provide the verbose output (--verbose), especially for locking and dependencies resolving issues.
$ pipenv install --verbose
Pipfile.lock not found, creating...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.starting()
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('opencv-python'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting opencv-python (from -r /tmp/pipenv-1punaydv-requirements/pipenv-pyq_aec5-constraints.txt (line 3))
INFO:pipenv.patched.pip._internal.network.download:Using cached opencv_python-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (20 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('torch~=2.5.1'), None)
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting torch~=2.5.1 (from -r /tmp/pipenv-1punaydv-requirements/pipenv-pyq_aec5-constraints.txt (line 4))
INFO:pipenv.patched.pip._internal.network.download:Using cached https://download.pytorch.org/whl/test/xpu/torch-2.5.1%2Bxpu-cp311-cp311-linux_x86_64.whl (851.9 MB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.starting_round(0)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('numpy>=1.21.2; python_version >= "3.10"'),
LinkCandidate('https://files.pythonhosted.org/packages/3f/a4/d2537f47fd7fcfba966bd806e3ec18e7ee1681056d4b0a9c8d983983e4d5/opencv_python-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (from
https://pypi.org/simple/opencv-python/) (requires-python:>=3.6)'))
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting numpy>=1.21.2 (from opencv-python->-r /tmp/pipenv-1punaydv-requirements/pipenv-pyq_aec5-constraints.txt (line 3))
INFO:pipenv.patched.pip._internal.network.download:Using cached numpy-2.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (62 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('numpy>=1.23.5; python_version >= "3.11"'),
LinkCandidate('https://files.pythonhosted.org/packages/3f/a4/d2537f47fd7fcfba966bd806e3ec18e7ee1681056d4b0a9c8d983983e4d5/opencv_python-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (from
https://pypi.org/simple/opencv-python/) (requires-python:>=3.6)'))
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('numpy>=1.17.0; python_version >= "3.7"'),
LinkCandidate('https://files.pythonhosted.org/packages/3f/a4/d2537f47fd7fcfba966bd806e3ec18e7ee1681056d4b0a9c8d983983e4d5/opencv_python-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (from
https://pypi.org/simple/opencv-python/) (requires-python:>=3.6)'))
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('numpy>=1.17.3; python_version >= "3.8"'),
LinkCandidate('https://files.pythonhosted.org/packages/3f/a4/d2537f47fd7fcfba966bd806e3ec18e7ee1681056d4b0a9c8d983983e4d5/opencv_python-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (from
https://pypi.org/simple/opencv-python/) (requires-python:>=3.6)'))
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('numpy>=1.19.3; python_version >= "3.9"'),
LinkCandidate('https://files.pythonhosted.org/packages/3f/a4/d2537f47fd7fcfba966bd806e3ec18e7ee1681056d4b0a9c8d983983e4d5/opencv_python-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (from
https://pypi.org/simple/opencv-python/) (requires-python:>=3.6)'))
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.pinning(LinkCandidate('https://files.pythonhosted.org/packages/3f/a4/d2537f47fd7fcfba966bd806e3ec18e7ee1681056d4b0a9c8d983983e4d5/opencv_python-4.10.0.84-cp37-ab
i3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (from https://pypi.org/simple/opencv-python/) (requires-python:>=3.6)'))
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.ending_round(0, state)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.starting_round(1)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('filelock'), LinkCandidate('https://download.pytorch.org/whl/test/xpu/torch-2.5.1%2Bxpu-cp311-cp311-linux_x86_64.whl
(from https://download.pytorch.org/whl/test/xpu/torch/)'))
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting filelock (from torch~=2.5.1->-r /tmp/pipenv-1punaydv-requirements/pipenv-pyq_aec5-constraints.txt (line 4))
INFO:pipenv.patched.pip._internal.network.download:Using cached filelock-3.16.1-py3-none-any.whl.metadata (2.9 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('typing-extensions>=4.8.0'),
LinkCandidate('https://download.pytorch.org/whl/test/xpu/torch-2.5.1%2Bxpu-cp311-cp311-linux_x86_64.whl (from https://download.pytorch.org/whl/test/xpu/torch/)'))
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting typing-extensions>=4.8.0 (from torch~=2.5.1->-r /tmp/pipenv-1punaydv-requirements/pipenv-pyq_aec5-constraints.txt (line 4))
INFO:pipenv.patched.pip._internal.network.download:Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('networkx'), LinkCandidate('https://download.pytorch.org/whl/test/xpu/torch-2.5.1%2Bxpu-cp311-cp311-linux_x86_64.whl
(from https://download.pytorch.org/whl/test/xpu/torch/)'))
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting networkx (from torch~=2.5.1->-r /tmp/pipenv-1punaydv-requirements/pipenv-pyq_aec5-constraints.txt (line 4))
INFO:pipenv.patched.pip._internal.network.download:Using cached networkx-3.4.2-py3-none-any.whl.metadata (6.3 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('jinja2'), LinkCandidate('https://download.pytorch.org/whl/test/xpu/torch-2.5.1%2Bxpu-cp311-cp311-linux_x86_64.whl (from
https://download.pytorch.org/whl/test/xpu/torch/)'))
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting jinja2 (from torch~=2.5.1->-r /tmp/pipenv-1punaydv-requirements/pipenv-pyq_aec5-constraints.txt (line 4))
INFO:pipenv.patched.pip._internal.network.download:Using cached jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('fsspec'), LinkCandidate('https://download.pytorch.org/whl/test/xpu/torch-2.5.1%2Bxpu-cp311-cp311-linux_x86_64.whl (from
https://download.pytorch.org/whl/test/xpu/torch/)'))
INFO:pipenv.patched.pip._internal.operations.prepare:Collecting fsspec (from torch~=2.5.1->-r /tmp/pipenv-1punaydv-requirements/pipenv-pyq_aec5-constraints.txt (line 4))
INFO:pipenv.patched.pip._internal.network.download:Using cached fsspec-2024.12.0-py3-none-any.whl.metadata (11 kB)
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('pytorch-triton-xpu==3.1.0; platform_system == "Linux" and platform_machine == "x86_64" and python_version < "3.13"'),
LinkCandidate('https://download.pytorch.org/whl/test/xpu/torch-2.5.1%2Bxpu-cp311-cp311-linux_x86_64.whl (from https://download.pytorch.org/whl/test/xpu/torch/)'))
INFO:pipenv.patched.pip._internal.resolution.resolvelib.reporter:Reporter.rejecting_candidate(Criterion((SpecifierRequirement('pytorch-triton-xpu==3.1.0; platform_system == "Linux" and platform_machine == "x86_64" and python_version <
"3.13"'), via=LinkCandidate('https://download.pytorch.org/whl/test/xpu/torch-2.5.1%2Bxpu-cp311-cp311-linux_x86_64.whl (from https://download.pytorch.org/whl/test/xpu/torch/)'))),
LinkCandidate('https://download.pytorch.org/whl/test/xpu/torch-2.5.1%2Bxpu-cp311-cp311-linux_x86_64.whl (from https://download.pytorch.org/whl/test/xpu/torch/)'))
CRITICAL:pipenv.patched.pip._internal.resolution.resolvelib.factory:Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python
>=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
CRITICAL:pipenv.patched.pip._internal.resolution.resolvelib.factory:Could not find a version that satisfies the requirement pytorch-triton-xpu==3.1.0; platform_system == "Linux" and platform_machine == "x86_64" and python_version <
"3.13" (from torch) (from versions: none)
Traceback (most recent call last):
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/patched/pip/_vendor/resolvelib/resolvers.py", line 316, in _backjump
name, candidate = broken_state.mapping.popitem()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'dictionary is empty'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
result = self._result = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/patched/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/patched/pip/_vendor/resolvelib/resolvers.py", line 434, in resolve
success = self._backjump(causes)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/patched/pip/_vendor/resolvelib/resolvers.py", line 318, in _backjump
raise ResolutionImpossible(causes)
pipenv.patched.pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('pytorch-triton-xpu==3.1.0; platform_system == "Linux" and platform_machine == "x86_64" and python_version <
"3.13"'), parent=LinkCandidate('https://download.pytorch.org/whl/test/xpu/torch-2.5.1%2Bxpu-cp311-cp311-linux_x86_64.whl (from https://download.pytorch.org/whl/test/xpu/torch/)'))]
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 458, in resolve
results = resolver.resolve(self.constraints, check_supported_wheels=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/resolver.py", line 104, in resolve
raise error from e
pipenv.patched.pip._internal.exceptions.DistributionNotFound: No matching distribution found for pytorch-triton-xpu==3.1.0; platform_system == "Linux" and platform_machine == "x86_64" and python_version < "3.13"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/resolver.py", line 466, in <module>
main()
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/resolver.py", line 452, in main
_main(
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/resolver.py", line 436, in _main
resolve_packages(
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/resolver.py", line 400, in resolve_packages
results, resolver = resolve_deps(
^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 968, in resolve_deps
results, hashes, internal_resolver = actually_resolve_deps(
^^^^^^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 735, in actually_resolve_deps
resolver.resolve()
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 460, in resolve
raise ResolutionFailure(message=str(e))
pipenv.exceptions.ResolutionFailure: ERROR: No matching distribution found for pytorch-triton-xpu==3.1.0; platform_system == "Linux" and platform_machine == "x86_64" and python_version < "3.13"
✘ Locking Failed!
⠏ Locking packages...
Traceback (most recent call last):
File "/home/adriano.vieira/.local/bin/pipenv", line 8, in <module>
sys.exit(cli())
~~~^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/cli/options.py", line 52, in main
return super().main(*args, **kwargs, windows_expand_args=False)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/cli/command.py", line 207, in install
do_install(
~~~~~~~~~~^
state.project,
^^^^^^^^^^^^^^
...<14 lines>...
skip_lock=state.installstate.skip_lock,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/routines/install.py", line 285, in do_install
do_init(
~~~~~~~^
project,
^^^^^^^^
...<6 lines>...
categories=pipfile_categories,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/routines/install.py", line 694, in do_init
handle_lockfile(
~~~~~~~~~~~~~~~^
project,
^^^^^^^^
...<8 lines>...
categories=categories,
^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/routines/install.py", line 175, in handle_lockfile
handle_missing_lockfile(project, system, allow_global, pre, pypi_mirror)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/routines/install.py", line 233, in handle_missing_lockfile
do_lock(
~~~~~~~^
project,
^^^^^^^^
...<3 lines>...
pypi_mirror=pypi_mirror,
^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/routines/lock.py", line 67, in do_lock
venv_resolve_deps(
~~~~~~~~~~~~~~~~~^
packages,
^^^^^^^^^
...<10 lines>...
extra_pip_args=extra_pip_args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 907, in venv_resolve_deps
c = resolve(cmd, st, project=project)
File "/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv/utils/resolver.py", line 771, in resolve
raise RuntimeError("Failed to lock Pipfile.lock!")
RuntimeError: Failed to lock Pipfile.lock!
Steps to replicate
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
Please run $ pipenv --support, and paste the results here.
$ pipenv --support
Pipenv version: '2024.4.0'
Pipenv location: '/home/adriano.vieira/.local/lib/python3.13/site-packages/pipenv'
Python location: '/usr/bin/python3'
OS Name: 'posix'
User pip version: '24.3.1'
user Python installations found:
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.13.0',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '6.11.11-300.fc41.x86_64',
'platform_system': 'Linux',
'platform_version': '#1 SMP PREEMPT_DYNAMIC Thu Dec 5 18:38:25 UTC 2024',
'python_full_version': '3.13.0',
'python_version': '3.13',
'sys_platform': 'linux'}
System environment variables:
COLORTERMDBUS_SESSION_BUS_ADDRESSDEBUGINFOD_IMA_CERT_PATHDEBUGINFOD_URLSDESKTOP_SESSIONDISPLAYEDITORGDMSESSIONGDM_LANGGNOME_SETUP_DISPLAYGPG_TTYHISTCONTROLHISTSIZEHOMEHOSTNAMEINVOCATION_IDJOURNAL_STREAMLANGLESSOPENLOGNAMEMAILMANAGERPIDMEMORY_PRESSURE_WATCHMEMORY_PRESSURE_WRITEMOZ_GMP_PATHOLDPWDPATHPTYXIS_PROFILEPTYXIS_VERSIONPWDQT_IM_MODULESESSION_MANAGERSHELLSHLVLSSH_AUTH_SOCKSYSTEMD_EXEC_PIDSYSTEMD_SLEEP_FREEZE_USER_SESSIONSTERMUSERUSERNAMEVTE_VERSIONWAYLAND_DISPLAYXAUTHORITYXDG_CURRENT_DESKTOPXDG_DATA_DIRSXDG_MENU_PREFIXXDG_RUNTIME_DIRXDG_SESSION_CLASSXDG_SESSION_DESKTOPXDG_SESSION_TYPEXMODIFIERSLS_COLORSZSHPAGERLESSLSCOLORSCMPLR_ROOTLIBRARY_PATHLD_LIBRARY_PATHPKG_CONFIG_PATHNLSPATHMANPATHCMAKE_PREFIX_PATHDIAGUTIL_PATHUMF_ROOTCPATHTCM_ROOTPti_DIROCL_ICD_FILENAMESUSE_XPU_PIP_DISABLE_PIP_VERSION_CHECKPYTHONDONTWRITEBYTECODEPYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH:/opt/intel/oneapi/compiler/2025.0/bin:/opt/intel/oneapi/compiler/2025.0/bin:/home/adriano.vieira/bin:/home/adriano.vieira/.local/bin:/usr/local/bin:/home/adriano.vieira/Applications/flutter/bin:/home/adriano.vieira/Applications/android-studio/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbinSHELL:/usr/bin/zshEDITOR:/usr/bin/nanoLANG:pt_BR.UTF-8PWD:/home/adriano.vieira/Devel/Sandbox/IA_ML_DL/hello_ia
Contents of Pipfile ('/home/adriano.vieira/Devel/Sandbox/IA_ML_DL/hello_ia/Pipfile'):
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[[source]]
url = "https://download.pytorch.org/whl/test/xpu"
verify_ssl = true
name = "downloadpytorch"
[packages]
opencv-python = "*"
torch = {version = "~=2.5.1", index = "downloadpytorch"}
[dev-packages]
[requires]
python_version = "3.11"
I think probably a connectivity issue as it has to download several gigabytes of packages.
matteius@matteius-Ryzen9:~/pipenv-triage/torch-question$ pipenv install torch~=2.5.1 --index https://download.pytorch.org/whl/test/xpu
Creating a virtualenv for this project
Pipfile: /home/matteius/pipenv-triage/torch-question/Pipfile
Using /home/matteius/.pyenv/versions/3.13.2/bin/python3.13.2 to create virtualenv...
⠋ Creating virtual environment...created virtual environment CPython3.13.2.final.0-64 in 52ms
creator CPython3Posix(dest=/home/matteius/Envs/torch-question-TQTlPCvf, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/home/matteius/.local/share/virtualenv)
added seed packages: pip==25.0.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
✔ Successfully created virtual environment!
Virtualenv location: /home/matteius/Envs/torch-question-TQTlPCvf
Creating a Pipfile for this project...
Pipfile.lock not found, creating...
Locking dependencies...
Locking dependencies...
Updated Pipfile.lock (fedbd2ab7afd84cf16f128af0619749267b62277b4cb6989ef16d4bef6e4eef2)!
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Installing torch~=2.5.1...
✔ Installation Succeeded
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Installing dependencies from Pipfile.lock (e4eef2)...
All dependencies are now up-to-date!
Upgrading torch~=2.5.1 in dependencies.
Building requirements...
Resolving dependencies...
✔ Success!
⠋ Locking packages...Warning: Downloading file torch-2.5.1+xpu-cp310-cp310-linux_x86_64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp310-cp310-win_amd64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp311-cp311-linux_x86_64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp311-cp311-win_amd64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp312-cp312-linux_x86_64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp312-cp312-win_amd64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp313-cp313-linux_x86_64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp39-cp39-linux_x86_64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp39-cp39-win_amd64.whl to obtain hash...
Building requirements...
Resolving dependencies...
✔ Success!
⠼ Locking packages...Warning: Downloading file torch-2.5.1+xpu-cp310-cp310-linux_x86_64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp310-cp310-win_amd64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp311-cp311-linux_x86_64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp311-cp311-win_amd64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp312-cp312-linux_x86_64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp312-cp312-win_amd64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp313-cp313-linux_x86_64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp39-cp39-linux_x86_64.whl to obtain hash...
Downloading file torch-2.5.1+xpu-cp39-cp39-win_amd64.whl to obtain hash...
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Installing dependencies from Pipfile.lock (6ee4dc)...
All dependencies are now up-to-date!
Installing dependencies from Pipfile.lock (6ee4dc)...
I ran into this issue with Zscaler running on my work machine and it ended up being the MITM certificate not being trusted. If you set verify to false and try again that might narrow it down. At any rate if you ensure REQUESTS_CA_BUNDLE is set to a bundle with full certificate trust that might help you.