Skip to content

Commit

Permalink
Constraint setuptools to 72.1.0 or older in requirements.txt (pytorch…
Browse files Browse the repository at this point in the history
…#136489)

FIXES: pytorch#136541

Setuptools>=74.0.0 has deprecated support for some functions in distutils, and so the builds run into error such as ```AttributeError: module 'distutils' has no attribute '_msvccompiler'```. Also, the pytorch builds have setuptools pin to 72.1.0 according to these PRs: pytorch/builder#1995 and pytorch/builder@89d9a8c. So, until there is a fix to change the function usage in accordance with latest setuptools, the 72.1.0 version works fine.

Also observed in CI jobs: https://github.com/pytorch/pytorch/actions/runs/10979326524
Pull Request resolved: pytorch#136489
Approved by: https://github.com/malfet

Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
  • Loading branch information
2 people authored and pytorchmergebot committed Sep 26, 2024
1 parent 1b3c163 commit bc68f41
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ numpy
psutil
pyyaml
requests
setuptools
# Setuptools>=74.0.0 stopped support for directly using private funcs(_msvccompiler)
# and consolidated all compiler logic in distutils used in Pytorch build, so older
# is required until pytorch build not refactored to work for latest setuptools.
setuptools<=72.1.0
types-dataclasses
typing-extensions>=4.8.0
sympy==1.12.1 ; python_version == "3.8"
Expand All @@ -17,7 +20,5 @@ jinja2
fsspec
lintrunner
ninja
# setuptools was removed from default python install
setuptools ; python_version >= "3.12"
packaging
optree>=0.12.0 ; python_version <= "3.12"

0 comments on commit bc68f41

Please sign in to comment.