File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 94
94
pip install -r requirements-dev.txt
95
95
python setup.py install
96
96
97
+ # pytorch>=1.9.0,<1.11.0 is using "from setuptools import distutils; distutils.version.LooseVersion" anti-pattern
98
+ # which raises the error: AttributeError: module 'distutils' has no attribute 'version' for setuptools>59
99
+ bad_pth_version=$(python -c "import torch; print('.'.join(torch.__version__.split('.')[:2])) in ['1.9', '1.10']")
100
+ if [ "${bad_pth_version}" -eq "True" ]; then
101
+ pip install --upgrade "setuptools<59"
102
+ python -c "from setuptools import distutils; distutils.version.LooseVersion"
103
+ fi
104
+
97
105
# There is no more torchvision 0.5.0 binaries in anaconda pytorch channel:
98
106
# https://anaconda.org/pytorch/torchvision/files
99
107
- name : Install appropriate dependencies for PyTorch 1.4.0
You can’t perform that action at this time.
0 commit comments