Skip to content

Commit 1e50b5f

Browse files
rsnk96rajat2004
authored andcommitted
Removing Python 2 components
1 parent c33c1f2 commit 1e50b5f

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

opencvDirectInstall.sh

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ execute sudo apt-get install libpng-dev libjpeg-dev libtiff5-dev zlib1g-dev libw
6666
if [[ $(which python) = *"conda"* || (-n $CIINSTALL) ]] ; then
6767
PIP="pip install" # Even though we've forced usage of bash, if conda exists, it will derive it since the parent shell is zsh/ksh/....with conda in the path
6868
else
69-
execute sudo apt-get install python3 python3-dev python python-dev -y
70-
execute sudo apt-get install python3-tk python-tk -y
71-
if [[ ! -n $CIINSTALL ]]; then sudo apt-get install python3-pip python-pip -y; fi
69+
execute sudo apt-get install python3 python3-dev -y
70+
if [[ ! -n $CIINSTALL ]]; then sudo apt-get install python3-pip -y; fi
7271
PIP="sudo pip3 install"
7372
fi
7473
execute $PIP --upgrade numpy pip
@@ -174,9 +173,6 @@ git checkout -f $latest_tag
174173
mkdir -p build
175174
cd build
176175

177-
py2Ex=$(which python2)
178-
py2In=$(python2 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")
179-
py2Pack=$(python2 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
180176
py3Ex=$(which python3)
181177
py3In=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")
182178
py3Pack=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
@@ -206,9 +202,6 @@ fi
206202
cmake -D CMAKE_BUILD_TYPE=RELEASE \
207203
-D CMAKE_INSTALL_PREFIX=/usr/local \
208204
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
209-
-D PYTHON2_EXECUTABLE="$py2Ex" \
210-
-D PYTHON2_INCLUDE_DIR="$py2In" \
211-
-D PYTHON2_PACKAGES_PATH="$py2Pack" \
212205
-D PYTHON3_EXECUTABLE="$py3Ex" \
213206
-D PYTHON3_INCLUDE_DIR="$py3In" \
214207
-D PYTHON3_PACKAGES_PATH="$py3Pack" \

0 commit comments

Comments
 (0)