This commit is contained in:
2022-09-14 22:48:38 +04:00
parent e79a16e9df
commit bdaa38576a
4 changed files with 108 additions and 48 deletions

View File

@@ -20,22 +20,22 @@ CheckPython3()
{
echo ""
echo "============================================================="
echo "Python 3.7.7"
echo "Python 3.10.7"
echo "============================================================="
echo "Проверяем наличие Python3 в системе "
T=$(python3 -V | grep 3.7.7)
T=$(python3 -V | grep 3.10.7)
if [ "$T" == "" ];
then
echo "Устанавливаем зависимости для Python 3.7 "
sudo apt-get build-dep python3.7
echo "Устанавливаем зависимости для Python 3.10 "
sudo apt-get build-dep python3.10
echo "Скачиваем Python 3.7.7 "
echo "Скачиваем Python 3.10.7 "
cd /tmp/
wget -c https://www.python.org/ftp/python/3.7.7/Python-3.7.7.tgz
wget -c https://www.python.org/ftp/python/3.10.7/Python-3.10.7.tgz
echo "Распаковываем архив... "
tar -xvzf Python-3.7.7.tgz
cd Python-3.7.7
tar -xvzf Python-3.10.7.tgz
cd Python-3.10.7
echo "Настраиваем пакет... "
./configure --enable-optimizations
@@ -44,15 +44,15 @@ CheckPython3()
make
make test
echo "Устанавливаем Python 3.7.7... "
echo "Устанавливаем Python 3.10.7... "
sudo make install
else
echo "Уже установлен Python 3.7.7"
echo "Уже установлен Python 3.10.7"
return 1
fi
echo "Перепроверяем " $1
T=$(python3 -V | grep 3.7.7)
T=$(python3 -V | grep 3.10.7)
if $T= ""
then
echo "Не удалось установить " $1