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 9494 pip install -r requirements-dev.txt
9595 python setup.py install
9696
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}" == "True" ]; then
101+ pip install --upgrade "setuptools<59"
102+ python -c "from setuptools import distutils; distutils.version.LooseVersion"
103+ fi
104+
97105 # There is no more torchvision 0.5.0 binaries in anaconda pytorch channel:
98106 # https://anaconda.org/pytorch/torchvision/files
99107 - name : Install appropriate dependencies for PyTorch 1.4.0
You can’t perform that action at this time.
0 commit comments