setuptools pinning (#148879)

Fixes #148877

---

On 9 March 2025, [setuptools](https://pypi.org/project/setuptools/#history) published a new version  and it is causing an issue on `pytorch` with the following error:

```
AttributeError: module 'distutils' has no attribute '_msvccompiler'. Did you mean: 'ccompiler'?
```

Last known working version is [75.8.2](https://pypi.org/project/setuptools/75.8.2/)

Currently it is affecting Windows ARM64 nightly build, however soon it might affect also Windows x64 builds. (conda version is not updated yet [setuptools conda](https://anaconda.org/anaconda/setuptools)

Locally both `Windows ARM64` and `Windows x64` are having same problem with the latest `setuptools` (>75.8.2)

---

This PR is pinning `setuptools` version.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/148879
Approved by: https://github.com/seemethere
This commit is contained in:
Ozan Aydin
2025-03-10 21:29:29 +00:00
committed by PyTorch MergeBot
parent c652772af7
commit 8701b302cc

View File

@ -15,7 +15,8 @@ packaging
psutil
pyyaml
requests
setuptools
# issue on Windows after >= 75.8.2 - https://github.com/pytorch/pytorch/issues/148877
setuptools<=75.8.2
sympy>=1.13.3
types-dataclasses
typing-extensions>=4.10.0