Ubuntu 24.04 fix setup (#32783)

* fix tk-dev

* fix missing pip

* Update tools/install_python_dependencies.sh

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 987b0d9e03
This commit is contained in:
royjr 2024-06-18 14:27:28 -04:00 committed by GitHub
parent 1b836bdb86
commit 5f0c5f5616
2 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,9 @@
#!/usr/bin/env bash
set -e
# Increase the pip timeout to handle TimeoutError
export PIP_DEFAULT_TIMEOUT=200
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
ROOT=$DIR/../
cd $ROOT
@ -13,7 +16,7 @@ fi
if ! command -v "pyenv" > /dev/null 2>&1; then
echo "pyenv install ..."
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
PYENV_PATH_SETUP="export PATH=\$HOME/.pyenv/bin:\$HOME/.pyenv/shims:\$PATH"
PYENV_PATH_SETUP="export PATH=\$HOME/.pyenv/bin:\$HOME/.pyenv/shims:\$HOME/.pyenv/versions/${PYENV_PYTHON_VERSION}/bin:\$PATH"
fi
if [ -z "$PYENV_SHELL" ] || [ -n "$PYENV_PATH_SETUP" ]; then
@ -51,7 +54,12 @@ if ! pyenv prefix ${PYENV_PYTHON_VERSION} &> /dev/null; then
echo "python ${PYENV_PYTHON_VERSION} install ..."
CONFIGURE_OPTS="--enable-shared" pyenv install -f ${PYENV_PYTHON_VERSION}
fi
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv local ${PYENV_PYTHON_VERSION}
pyenv rehash
echo "update pip"
pip install pip==24.0

View File

@ -93,7 +93,8 @@ function install_ubuntu_lts_latest_requirements() {
qtchooser \
qt5-qmake \
qtbase5-dev-tools \
python3-dev
python3-dev \
tk-dev
}
# Install Ubuntu 20.04 packages