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() { function check_installed_pip() {
${PYTHON} -m pip > /dev/null ${PYTHON} -m pip > /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "pip not found (called as '${PYTHON} -m pip'). Please make sure that pip is available for ${PYTHON}." echo "-----------------------------"
exit 1 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 fi
} }
@ -17,13 +21,12 @@ function check_installed_python() {
exit 2 exit 2
fi fi
for v in 8 9 7 for v in 9 8 7
do do
PYTHON="python3.${v}" PYTHON="python3.${v}"
which $PYTHON which $PYTHON
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "using ${PYTHON}" echo "using ${PYTHON}"
check_installed_pip check_installed_pip
return return
fi fi
@ -147,7 +150,7 @@ function install_macos() {
# Install bot Debian_ubuntu # Install bot Debian_ubuntu
function install_debian() { function install_debian() {
sudo apt-get update 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 install_talib
} }