FS#77016 - [python-pytorch-opt-cuda] Missing libtiff dependency breaks PyTorch
Attached to Project:
Community Packages
Opened by bruce (brucethemoose) - Thursday, 05 January 2023, 19:17 GMT
Last edited by Toolybird (Toolybird) - Thursday, 05 January 2023, 22:27 GMT
Opened by bruce (brucethemoose) - Thursday, 05 January 2023, 19:17 GMT
Last edited by Toolybird (Toolybird) - Thursday, 05 January 2023, 22:27 GMT
|
Details
The latest build of PyTorch won't function at all due to a
missing libtiff library:
>>> import torch Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.10/site-packages/torch/__init__.py", line 218, in <module> from torch._C import * # noqa: F403 ImportError: libtiff.so.5: cannot open shared object file: No such file or directory >>> Checking the libtorch binary: ❯ ldd /usr/lib/libtorch.so | grep tiff libtiff.so.5 => not found libtiff.so.6 => /usr/lib/libtiff.so.6 (0x00007fa9ad135000) And libtiff: ❯ pacman -Fl libtiff | grep libtiff.so libtiff usr/lib/libtiff.so libtiff usr/lib/libtiff.so.6 libtiff usr/lib/libtiff.so.6.0.0 Oddly enough, libtiff is not a listed requirement for pytorch even though it is built against it. |
This task depends upon
Closed by Toolybird (Toolybird)
Thursday, 05 January 2023, 22:27 GMT
Reason for closing: Works for me
Thursday, 05 January 2023, 22:27 GMT
Reason for closing: Works for me
More info: this may or may not affect the regular pytorch packages (which dont require Nvidia graphics to test)
repro steps:
- install python-pytorch-opt-cuda
- enter "python" into a terminal
- enter "import torch" and the error will occur.
Pytorch worked fine a few days ago, but I'm not sure if the pytorch build or the recent libtiff update is the breaking point.
❯ lddtree /usr/lib/libtorch.so | grep tiff
libtiff.so.6 => /usr/lib/libtiff.so.6
I have attached the full output.
From the attached file, the only thing pulling in libtiff is /usr/lib/libcairo-gobject.so.2, which is already linked to the correct version.
What you're seeing is almost certainly a partial update error.