Skip to content

Commit ec24f51

Browse files
committed
Merge branch 'main' of github.com:luxonis/depthai-python into main
2 parents 7dbd035 + 6620b10 commit ec24f51

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

docs/source/_static/install_depthai.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ trap 'RET=$? ; echo -e >&2 "\n\x1b[31mFailed installing dependencies. Could be a
1212
while [ "$path_correct" = "false" ]
1313
do
1414
echo ""
15-
read -p $'ENTER absolute installation path for depthai or leave empty and default path: $HOME will be used.\n' -r install_path
15+
echo 'ENTER absolute installation path for depthai or leave empty and default path: $HOME will be used.'
16+
read install_path < /dev/tty
1617
echo ""
1718

1819
if [ "$install_path" = "" ]; then
@@ -44,15 +45,16 @@ python_version_number=""
4445
if [[ "$python_version" != 'Python'* ]]; then
4546
python_version=""
4647
fi
47-
echo $'\n'
48+
echo ""
4849

4950
# check default python version, offer it to the user or get another one
5051
while [ "$python_chosen" = "false" ]
5152
do
5253
if [[ "$python_version" == "" ]]; then
5354
echo "No python version found."
5455
echo "Input path for python binary, version 3.8 or higher, or leave empty and python 3.10 will be installed for you."
55-
read -p $'Press any key to continue\n' -r python_binary_path
56+
echo "Press any key to continue"
57+
read python_binary_path < /dev/tty
5658
# python not found and user wants to install python 3.10
5759
if [ "$python_binary_path" = "" ]; then
5860
install_python="true"
@@ -65,14 +67,16 @@ do
6567
echo "Python version: $python_version found."
6668
if [ "$nr_1" -gt 2 ] && [ "$nr_2" -gt 7 ]; then # first two digits of python version greater then 3.7 -> python version 3.8 or greater is allowed.
6769
echo "If you want to use it for installation, press ANY key, otherwise input path to python binary."
68-
read -p $'Press any key to continue\n' -r python_binary_path
70+
echo "Press any key to continue"
71+
read python_binary_path < /dev/tty
6972
# user wants to use already installed python whose version is high enough
7073
if [ "$python_binary_path" = "" ]; then
7174
python_chosen="true"
7275
fi
7376
else
7477
echo "This python version is not supported by depthai. Enter path to python binary version et least 3.8, or leave empty and python 3.10 will be installed automatically."
75-
read -p $'Press any key to continue\n' -r python_binary_path
78+
echo "Press any key to continue"
79+
read python_binary_path < /dev/tty
7680
# python version is too low and user wants to install python 3.10
7781
if [ "$python_binary_path" = "" ]; then
7882
install_python="true"
@@ -159,7 +163,7 @@ if [[ $(uname -s) == "Darwin" ]]; then
159163
"$python_executable" -m venv "$VENV_DIR"
160164
# activate environment
161165
source "$VENV_DIR/bin/activate"
162-
pip install --upgrade pip
166+
python -m pip install --upgrade pip
163167

164168
# install launcher dependencies
165169
# only on mac silicon point PYTHONPATH to pyqt5 installation via homebrew, otherwise install pyqt5 with pip
@@ -218,7 +222,7 @@ elif [[ $(uname -s) == "Linux" ]]; then
218222
"$python_executable" -m venv "$VENV_DIR"
219223

220224
source "$VENV_DIR/bin/activate"
221-
pip install --upgrade pip
225+
python -m pip install --upgrade pip
222226

223227
pip install packaging
224228
pip install pyqt5
@@ -229,6 +233,7 @@ fi
229233

230234
echo -e '\n\n:::::::::::::::: INSTALATION COMPLETE ::::::::::::::::\n'
231235
echo -e '\nTo run demo app write <depthai_launcher> in terminal.'
232-
read -rsp $'Press ANY KEY to finish and run the demo app...\n' -n1 key
236+
echo "Press ANY KEY to finish and run the demo app..."
237+
read -n1 key < /dev/tty
233238
echo "STARTING DEMO APP."
234239
python "$DEPTHAI_DIR/launcher/launcher.py" -r "$DEPTHAI_DIR"

0 commit comments

Comments
 (0)