diff --git a/tools/installers/install_chainer.sh b/tools/installers/install_chainer.sh index 9ce037f68f6..9000bfb0d5a 100755 --- a/tools/installers/install_chainer.sh +++ b/tools/installers/install_chainer.sh @@ -22,7 +22,7 @@ python_version=$(python3 -c "import sys; print(sys.version.split()[0])") cuda_version_without_dot="${cuda_version/\./}" python_plus(){ python3 <= L('$1'): print("true") else: @@ -31,7 +31,7 @@ EOF } cuda_plus(){ python3 <= L('$1'): print("true") else: diff --git a/tools/installers/install_fairscale.sh b/tools/installers/install_fairscale.sh index 876c0b31ead..4988a75736d 100755 --- a/tools/installers/install_fairscale.sh +++ b/tools/installers/install_fairscale.sh @@ -9,7 +9,7 @@ fi torch_version=$(python3 -c "import torch; print(torch.__version__)") python_36_plus=$(python3 <= V("3.6"): @@ -22,7 +22,7 @@ EOF pt_plus(){ python3 <= L('$1'): print("true") else: diff --git a/tools/installers/install_fairseq.sh b/tools/installers/install_fairseq.sh index 780d8ce81b0..e13970c036f 100755 --- a/tools/installers/install_fairseq.sh +++ b/tools/installers/install_fairseq.sh @@ -9,7 +9,7 @@ fi torch_version=$(python3 -c "import torch; print(torch.__version__)") python_36_plus=$(python3 <= V("3.6"): @@ -22,7 +22,7 @@ EOF pt_plus(){ python3 <= L('$1'): print("true") else: diff --git a/tools/installers/install_k2.sh b/tools/installers/install_k2.sh index 667edb86a03..d41c16d39e7 100755 --- a/tools/installers/install_k2.sh +++ b/tools/installers/install_k2.sh @@ -27,7 +27,7 @@ fi python_36_plus=$(python3 <= V("3.6"): @@ -64,7 +64,7 @@ libc_version="$(${libc_path} | grep "GNU C Library" | grep -oP "version [0-9]*.[ pytorch_plus(){ python3 <= L('$1'): print("true") else: @@ -74,7 +74,7 @@ EOF libc_plus(){ python3 <= L('$1'): print("true") else: diff --git a/tools/installers/install_longformer.sh b/tools/installers/install_longformer.sh index c942abb0dd9..d054fad50ea 100755 --- a/tools/installers/install_longformer.sh +++ b/tools/installers/install_longformer.sh @@ -9,7 +9,7 @@ fi torch_version=$(python3 -c "import torch; print(torch.__version__)") python_36_plus=$(python3 <= V("3.6"): @@ -21,7 +21,7 @@ EOF pt_plus(){ python3 <= L('$1'): print("true") else: diff --git a/tools/installers/install_s3prl.sh b/tools/installers/install_s3prl.sh index 66f38af0e36..eeea6946c9c 100755 --- a/tools/installers/install_s3prl.sh +++ b/tools/installers/install_s3prl.sh @@ -10,7 +10,7 @@ if [ $# != 0 ]; then fi torch_17_plus=$(python3 <= V("1.7"): @@ -21,7 +21,7 @@ EOF ) python_36_plus=$(python3 <= V("3.6"): diff --git a/tools/installers/install_speechbrain.sh b/tools/installers/install_speechbrain.sh index b3c2310206e..cb26a78f3ad 100755 --- a/tools/installers/install_speechbrain.sh +++ b/tools/installers/install_speechbrain.sh @@ -8,7 +8,7 @@ if [ $# != 0 ]; then fi torch_18_plus=$(python3 <= V("1.8"): diff --git a/tools/installers/install_torch.sh b/tools/installers/install_torch.sh index 6444f91562e..d542183db53 100755 --- a/tools/installers/install_torch.sh +++ b/tools/installers/install_torch.sh @@ -29,7 +29,7 @@ cuda_version_without_dot="${cuda_version/\./}" python_plus(){ python3 <= L('$1'): print("true") else: @@ -38,7 +38,7 @@ EOF } pytorch_plus(){ python3 <= L('$1'): print("true") else: diff --git a/tools/installers/install_torch_optimizer.sh b/tools/installers/install_torch_optimizer.sh index 5d8565deead..a4b42d4fade 100755 --- a/tools/installers/install_torch_optimizer.sh +++ b/tools/installers/install_torch_optimizer.sh @@ -9,7 +9,7 @@ fi torch_version=$(python3 -c "import torch; print(torch.__version__)") python_36_plus=$(python3 <= V("3.6"): @@ -22,7 +22,7 @@ EOF pt_plus(){ python3 <= L('$1'): print("true") else: diff --git a/tools/installers/install_warp-ctc.sh b/tools/installers/install_warp-ctc.sh index 38267d955d4..259146ea388 100755 --- a/tools/installers/install_warp-ctc.sh +++ b/tools/installers/install_warp-ctc.sh @@ -9,7 +9,7 @@ if [ $# != 0 ]; then fi torch_17_plus=$(python3 <= V("1.7"): @@ -20,7 +20,7 @@ EOF ) torch_11_plus=$(python3 <= V("1.1"): @@ -31,7 +31,7 @@ EOF ) torch_10_plus=$(python3 <= V("1.0"): diff --git a/tools/installers/install_warp-transducer.sh b/tools/installers/install_warp-transducer.sh index 9ed3ce18fc3..910083509d4 100755 --- a/tools/installers/install_warp-transducer.sh +++ b/tools/installers/install_warp-transducer.sh @@ -9,7 +9,7 @@ fi # TODO(kamo): Consider clang case # Note: Requires gcc>=4.9.2 to build extensions with pytorch>=1.0 if python3 -c 'import torch as t;assert t.__version__[0] == "1"' &> /dev/null; then \ - python3 -c "from distutils.version import LooseVersion as V;assert V('$(gcc -dumpversion)') >= V('4.9.2'), 'Requires gcc>=4.9.2'"; \ + python3 -c "from packaging.version import parse as V;assert V('$(gcc -dumpversion)') >= V('4.9.2'), 'Requires gcc>=4.9.2'"; \ fi rm -rf warp-transducer