Merge pull request #5300 from samgermain/ubuntu-setup-fix

Fixed setup for python3.9 on ubuntu
This commit is contained in:
Matthias 2021-07-20 07:04:08 +02:00 committed by GitHub
commit f870c0099b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,8 +4,12 @@
function check_installed_pip() {
${PYTHON} -m pip > /dev/null
if [ $? -ne 0 ]; then
echo "pip not found (called as '${PYTHON} -m pip'). Please make sure that pip is available for ${PYTHON}."
exit 1
echo "-----------------------------"
echo "Installing Pip for ${PYTHON}"
echo "-----------------------------"
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
${PYTHON} get-pip.py
rm get-pip.py
fi
}
@ -17,13 +21,12 @@ function check_installed_python() {
exit 2
fi
for v in 8 9 7
for v in 9 8 7
do
PYTHON="python3.${v}"
which $PYTHON
if [ $? -eq 0 ]; then
echo "using ${PYTHON}"
check_installed_pip
return
fi
@ -147,7 +150,7 @@ function install_macos() {
# Install bot Debian_ubuntu
function install_debian() {
sudo apt-get update
sudo apt-get install -y build-essential autoconf libtool pkg-config make wget git libpython3-dev
sudo apt-get install -y build-essential autoconf libtool pkg-config make wget git $(echo lib${PYTHON}-dev ${PYTHON}-venv)
install_talib
}