File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44# Filename : visualpy
55# function : control visualpython for Mac/Linux
66# Creator : BlackLogic - LJ
7- # version : 2.1
7+ # version : 2.2
88# License :
99# Date : 2020 07.27
10- # Mdate : 2020 12.29
10+ # Mdate : 2021 07.20
1111#============================================================================
1212
13- v_path1=`pip show visualpython | grep Location | awk -F': ' '{print $2}'`
13+ v_pip=pip
14+ which pip3 > /dev/null 2>&1 && v_pip=pip3
15+
16+ v_path1=`${v_pip} show visualpython | grep Location | awk -F': ' '{print $2}'`
1417v_prod='visualpython'
1518v_str1='jupyter nbextension'
1619v_str2='visualpython/src/main'
17- v_unst='pip uninstall '${v_prod}
18- v_upgr='pip install '${v_prod}' --upgrade'
19- #v_srch='pip search '${v_prod}
20- v_str3='pip list -o '
21- v_str4='pip show '${v_prod}
20+ v_unst=${v_pip}' uninstall '${v_prod}
21+ v_upgr=${v_pip}' install '${v_prod}' --upgrade'
22+ #v_srch=${v_pip}' search '${v_prod}
23+ v_str3=${v_pip}' list -o '
24+ v_str4=${v_pip}' show '${v_prod}
2225#v_list=`${v_str3} | grep -i ${v_prod}`
2326v_curt=`${v_str4} | grep 'Version' | cut -d ' ' -f 2`
2427v_option=$1
@@ -294,7 +297,7 @@ f_prt_extensiondir() {
294297 echo "jupyter contrib nbextension install --user"
295298 f_prt_line2
296299 echo "for pip"
297- echo "pip install -e jupyter_contrib_nbextensions"
300+ echo ${v_pip}" install -e jupyter_contrib_nbextensions"
298301 echo "jupyter contrib nbextension install --user"
299302 f_prt_line1
300303}
Original file line number Diff line number Diff line change @@ -4,28 +4,31 @@ rem #==========================================================================
44rem # Filename : visualpy.bat
55rem # function : control Visual Python for windows
66rem # Creator : BlackLogic - LJ
7- rem # version : 2.1
7+ rem # version : 2.2
88rem # License : GPLv3
99rem # Date : 2020 07.30
10- rem # MDate : 2020 12.29
10+ rem # MDate : 2020 07.20
1111rem #==========================================================================
1212
1313rem ## setting variables
1414
15+ set v_pip = pip
16+ where pip3 > nul 2 >& 1 && set v_pip = pip3
17+
1518set v_prod = visualpython
1619(echo " %v_prod% " & echo .) | findstr /O . | more +1 | (set /P RESULT= & call exit /B %% RESULT%% )
1720set /A v_prd_length = %ERRORLEVEL%- 5
1821set v_option = %1
19- for /f " delims=, tokens=1*" %%i in ('pip show %v_prod% 2^ > ^ &1 ^ | find " Location" ') do (
22+ for /f " delims=, tokens=1*" %%i in ('%v_pip% show %v_prod% 2^ > ^ &1 ^ | find " Location" ') do (
2023set v_1 = %%i )
2124set v_path1 = %v_1:~10 %
2225set v_str1 = jupyter nbextension
2326set v_str2 = %v_prod% /src/main
24- set v_srch = pip search %v_prod%
27+ set v_srch = %v_pip% search %v_prod%
2528set v_upgr = pip install %v_prod% --upgrade
26- set v_unst = pip uninstall %v_prod%
27- set v_ckup = pip list -o
28- set v_show = pip show %v_prod%
29+ set v_unst = %v_pip% uninstall %v_prod%
30+ set v_ckup = %v_pip% list -o
31+ set v_show = %v_pip% show %v_prod%
2932
3033rem check env & setting path2
3134where /q conda-env
You can’t perform that action at this time.
0 commit comments