Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions src/init/init_python.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# Version 20210922_1904

if [ "$OS" == "Windows_NT" ]
then
Expand All @@ -9,7 +10,7 @@ then
echo -en "Press ENTER when Setup is finished. "
read -r RESPONSE
else
PYTHON_BIN=python3
PYTHON_BIN="python3"
fi

echo "${PYTHON_BIN}"
Expand All @@ -21,14 +22,23 @@ else
fi

if [ -x "$(command -v pip3)" ]; then
PIP=pip3
PIP="${PYTHON_BIN} -m pip"
else
exit 2
fi

echo -en "Installing Python3 dependencies... "
$PIP install --upgrade pip --no-warn-script-location 2>&1 > /dev/null
$PIP install ipfshttpclient==0.8.0a2 web3 psutil --upgrade --no-warn-script-location 2>&1 > /dev/null

if [ -f /etc/os-release ]; then
# CentOS 8 requires sudo for pip upgrade
if [ "$(grep -E "^NAME=" /etc/os-release | grep CentOS)" ]; then
sudo $PIP install --upgrade pip -qq > /dev/null 2>&1
fi
else
$PIP install --upgrade pip -qq > /dev/null 2>&1
fi

$PIP install ipfshttpclient==0.8.0a2 web3 psutil --upgrade -qq > /dev/null 2>&1
echo "done"

[ -d certs ] || mkdir certs
Expand Down