diff --git a/tools/extras/install_mmseg.sh b/tools/extras/install_mmseg.sh index 586740b5cbc..3c50ddc7dad 100755 --- a/tools/extras/install_mmseg.sh +++ b/tools/extras/install_mmseg.sh @@ -18,7 +18,7 @@ if ! $(python -c "import distutils.sysconfig" &> /dev/null); then echo "Proceeding with installation." >&2 else # get include path for this python version - INCLUDE_PY=$(python -c "from distutils import sysconfig as s; print s.get_config_vars()['INCLUDEPY']") + INCLUDE_PY=$(python -c "from distutils import sysconfig as s; print(s.get_python_inc())") if [ ! -f "${INCLUDE_PY}/Python.h" ]; then echo "$0 : ERROR: python-devel/python-dev not installed" >&2 if which yum >&/dev/null; then diff --git a/tools/extras/install_phonetisaurus.sh b/tools/extras/install_phonetisaurus.sh index 617aa341b32..e7594233d52 100755 --- a/tools/extras/install_phonetisaurus.sh +++ b/tools/extras/install_phonetisaurus.sh @@ -21,7 +21,7 @@ if ! $(python -c "import distutils.sysconfig" &> /dev/null); then echo "Proceeding with installation." >&2 else # get include path for this python version - INCLUDE_PY=$(python -c "from distutils import sysconfig as s; print s.get_config_vars()['INCLUDEPY']") + INCLUDE_PY=$(python -c "from distutils import sysconfig as s; print(s.get_python_inc())") if [ ! -f "${INCLUDE_PY}/Python.h" ]; then echo "$0 : ERROR: python-devel/python-dev not installed" >&2 if which yum >&/dev/null; then diff --git a/tools/extras/install_sequitur.sh b/tools/extras/install_sequitur.sh index 6ee4d9f4336..4250006651b 100755 --- a/tools/extras/install_sequitur.sh +++ b/tools/extras/install_sequitur.sh @@ -18,7 +18,7 @@ if ! $(python -c "import distutils.sysconfig" &> /dev/null); then echo "Proceeding with installation." >&2 else # get include path for this python version - INCLUDE_PY=$(python -c "from distutils import sysconfig as s; print s.get_config_vars()['INCLUDEPY']") + INCLUDE_PY=$(python -c "from distutils import sysconfig as s; print(s.get_python_inc())") if [ ! -f "${INCLUDE_PY}/Python.h" ]; then echo "$0 : ERROR: python-devel/python-dev not installed" >&2 if which yum >&/dev/null; then