FS#77895 - [python-pytorch] python-sympy needs to be added as a dependency.

Attached to Project: Community Packages
Opened by Oid Maps (dreieck) - Saturday, 18 March 2023, 09:10 GMT
Last edited by Toolybird (Toolybird) - Saturday, 18 March 2023, 20:54 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



python-pytorch needs python-sympy added as dependency.


* https://github.com/pytorch/vision/issues/7034,
* https://github.com/jzbor/sdiff-gtk/issues/7#issuecomment-1474520403

Additional info:
* package version(s): python-pytorch 2.0.0rc5-2

Steps to reproduce:

1. Install community/python-pytorch version 2.0.0rc5-2
2. Run python -c 'import torch'
3. observe the following error:

No sympy found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.10/site-packages/torch/__init__.py", line 1465, in <module>
from . import _meta_registrations
File "/usr/lib/python3.10/site-packages/torch/_meta_registrations.py", line 7, in <module>
from torch._decomp import _add_op_to_registry, global_decomposition_table, meta_table
File "/usr/lib/python3.10/site-packages/torch/_decomp/__init__.py", line 169, in <module>
import torch._decomp.decompositions
File "/usr/lib/python3.10/site-packages/torch/_decomp/decompositions.py", line 10, in <module>
import torch._prims as prims
File "/usr/lib/python3.10/site-packages/torch/_prims/__init__.py", line 33, in <module>
from torch._subclasses.fake_tensor import FakeTensor, FakeTensorMode
File "/usr/lib/python3.10/site-packages/torch/_subclasses/__init__.py", line 3, in <module>
from torch._subclasses.fake_tensor import (
File "/usr/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 13, in <module>
from torch._guards import Source
File "/usr/lib/python3.10/site-packages/torch/_guards.py", line 78, in <module>
class ShapeGuard(NamedTuple):
File "/usr/lib/python3.10/site-packages/torch/_guards.py", line 79, in ShapeGuard
expr: sympy.Expr
NameError: name 'sympy' is not defined

4. install python-sympy
5. repeat 2.
6. do not observe the error anymore
This task depends upon

Closed by  Toolybird (Toolybird)
Saturday, 18 March 2023, 20:54 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#77834