@@ -4,14 +4,17 @@ echo keep me in ansi =utf-8 without BOM (notepad plus plus or win10 screwing u
44rem 2020-09-26 Jupyterlab-3 simplification
55rem 2020-09-27 Jupyterlab-3 5S (looking for missing detail)
66rem 2020-10-25no_more_needed "nbextension enable" no more needed for bqplot, ipyleaflet, ipympl
7+ rem 2021-01-16: jupyterlab2 stuff removal
78
89rem use this in case we go back to jupyterlab-2
910if " %jupyterlab2% " == " " set jupyterlab2 = 0
1011echo jupyterlab2=%jupyterlab2%
1112if %jupyterlab2% == 1 then echo " do jupyterlab2 %jupyterlab2% stuff"
13+
1214rem if build error, launch "WinPython Command Prompt.exe" dos ico, then try manual install of requirements.txt
13- rem that is: pip install --pre --no-index --trusted-host=None --find-links=C:\WinP\packages.srcreq -c C:\WinP\constraints.txt -r c:\....\requirements.txt
15+ rem that is: pip install --pre --no-index --trusted-host=None --log C:\WinP\log.txt --find-links=C:\WinP\packages.srcreq -c C:\WinP\constraints.txt -r c:\....\requirements.txt
1416rem ( drag & drop "requirements.txt" file in the dos window a the end of the line, to get full path)
17+ rem if issue, search "ERROR:" in --log C:\WinP\log.txt
1518rem then drag & drop "run_complement_newbuild.bat" file in the dos window and launch it
1619
1720@ echo off
@@ -48,30 +51,11 @@ if "%jupyterlab2%"=="1" if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" "%WI
4851
4952@ echo on
5053rem * ===================
51- echo jupyterlab manager (if npm there)
54+ echo jupyterlab pre-clean meaningless in 3.0
5255rem * ==================
5356@ echo off
5457rem pre-clean Whatever jupyterlab version
55- if exist " %WINPYDIR% \Lib\site-packages\jupyterlab" " %WINPYDIR% \Scripts\jupyter.exe" lab clean
56-
57- rem jupyter labextension list
58-
59- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\jupyterlab" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build @ jupyter-widgets/jupyterlab-manager
60-
61-
62- rem * ==================
63- echo finish install of bqplot
64- rem * =================
65- rem 2020-10-25no_more_needed if exist "%WINPYDIR%\Lib\site-packages\bqplot" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix bqplot
66-
67- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\bqplot" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build bqplot
68-
69-
70- rem * ==================
71- echo finish install of bokeh for jupyterlab (2019-08-10)
72- rem * =================
73-
74- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\bokeh" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build @ bokeh/jupyter_bokeh
58+ rem if exist "%WINPYDIR%\Lib\site-packages\jupyterlab" "%WINPYDIR%\Scripts\jupyter.exe" lab clean
7559
7660
7761rem * ==================
@@ -80,24 +64,6 @@ rem * =================
8064if exist " %WINPYDIR% \Lib\site-packages\ipydatawidgets" " %WINPYDIR% \Scripts\jupyter.exe" nbextension install --py --sys-prefix ipydatawidgets
8165if exist " %WINPYDIR% \Lib\site-packages\ipydatawidgets" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipydatawidgets
8266
83- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\ipydatawidgets" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build jupyterlab-datawidgets
84-
85-
86- rem * ==================
87- echo finish install of ipyleaflet
88- rem * =================
89- rem 2020-10-25no_more_needed if exist "%WINPYDIR%\Lib\site-packages\ipyleaflet" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipyleaflet
90-
91- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\ipyleaflet" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build jupyter-leaflet
92-
93-
94- rem * ==================
95- echo finish install of pythreejs
96- rem * =================
97- rem 2020-10-25no_more_needed if exist "%WINPYDIR%\Lib\site-packages\pythreejs" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix pythreejs
98-
99- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\pythreejs" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build jupyter-threejs
100-
10167
10268rem * ==================
10369echo finish install of ipyvolume / ipywebrtc
@@ -106,20 +72,11 @@ if exist "%WINPYDIR%\Lib\site-packages\ipywebrtc" "%WINPYDIR%\Scripts\jupyter.e
10672if exist " %WINPYDIR% \Lib\site-packages\ipyvolume" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipyvolume
10773
10874
109- rem * ==================
110- echo finish install of ipyvolume / ipywebrtc
111- rem * =================
112-
113- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\ipywebrtc" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build jupyter-webrtc
114- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\ipywebrtc" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build ipyvolume
115-
116-
11775rem * ==================
11876echo finish install of pdvega
11977rem * =================
12078if exist " %WINPYDIR% \Lib\site-packages\vega3" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix vega3
12179
122- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\jupyterlab" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build @ jupyterlab/vega3-extension
12380
12481rem * ==================
12582echo finish install of rise
@@ -128,75 +85,40 @@ if exist "%WINPYDIR%\Lib\site-packages\rise" "%WINPYDIR%\Scripts\jupyter.exe" n
12885if exist " %WINPYDIR% \Lib\site-packages\rise" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix rise
12986
13087
131- rem * ==================
132- echo finish install of ipympl (2017-10-29)
133- rem * =================
134- rem 2020-10-25no_more_needed if exist "%WINPYDIR%\Lib\site-packages\ipympl" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipympl
135-
136- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\ipympl" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build jupyter-matplotlib
137-
138- rem * =================
139- echo finish install of holoviews jupyterlab 2018-02-27
140- rem * =================
141-
142- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\holoviews" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build @ pyviz/jupyterlab_pyviz
143-
14488rem * ==================
14589echo finish install of nteract_on_jupyter (2018-12-27)
14690rem * =================
14791if exist " %WINPYDIR% \Lib\site-packages\nteract_on_jupyter" " %WINPYDIR% \Scripts\jupyter.exe" serverextension enable nteract_on_jupyter
14892
14993
150- rem * ==================
151- echo finish install of Qgrid(2020-03-10)
152- rem * =================
153- if exist " %WINPYDIR% \Lib\site-packages\qgrid" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix qgrid
154-
155- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\qgrid" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build qgrid2
156-
157- rem * ==================
158- echo finish install of Jupyterlab-sql
159- rem * ==================
160-
161- rem if exist "%WINPYDIR%\Lib\site-packages\jupyterlab_sql" "%WINPYDIR%\Scripts\jupyter.exe" serverextension enable jupyterlab_sql --py --sys-prefix
162- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\jupyterlab_sql" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build @ jupyterlab-sql
163-
164-
16594rem * ==================
16695echo finish install of Voila (2019-07-21)
16796rem * =================
16897if exist " %WINPYDIR% \Lib\site-packages\voila" " %WINPYDIR% \Scripts\jupyter.exe" serverextension enable voila --sys-prefix
16998
170- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\voila" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build @ jupyter-voila/jupyterlab-preview
17199
172100rem * ==================
173- echo install of dataregistry (2019-07-28)(no more 2020-07-27 )
101+ echo install of pydeck ( 2020-02-02 )
174102rem * =================
175- if " %jupyterlab2% " == " 1 " if exist " %WINPYDIR% \Lib\site-packages\voila " " %WINPYDIR% \Scripts\jupyter.exe" labextension install @ jupyterlab/dataregistry-extension
103+ if exist " %WINPYDIR% \Lib\site-packages\pydeck " " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix pydeck
176104
177105
178106rem * ==================
179- echo install of pydeck (2020-02-02 )
107+ echo install of labextension install dask-labextension (2020-02-05 )
180108rem * =================
181- if exist " %WINPYDIR% \Lib\site-packages\pydeck " " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix pydeck
182- if " %jupyterlab2% " == " 1 " if exist " %WINPYDIR% \Lib\site-packages\pydeck " " %WINPYDIR% \Scripts\jupyter.exe " labextension install --no-build @ deck.gl/jupyter-widget
109+ rem no more if exist "%WINPYDIR%\Lib\site-packages\dask_labextension " "%WINPYDIR%\Scripts\jupyter.exe" serverextension enable dask_labextension
110+
183111
184112rem * ==================
185- echo install of labextension install dask-labextension (2020-02-05 )
113+ echo finish install of ipygany (2020-12-29 )
186114rem * =================
187- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\dask_labextension" " %WINPYDIR% \Scripts\jupyter.exe" labextension install --no-build dask-labextension
188- if exist " %WINPYDIR% \Lib\site-packages\dask_labextension" " %WINPYDIR% \Scripts\jupyter.exe" serverextension enable dask_labextension
115+ if exist " %WINPYDIR% \Lib\site-packages\ipygany" " %WINPYDIR% \Scripts\jupyter.exe" nbextension enable --py --sys-prefix ipygany
189116
190117rem * =================
191118echo finish install seaborn iris example
192119rem * =================
193120if exist " %WINPYDIR% \Lib\site-packages\seaborn" " %WINPYDIR% \python.exe" -c " import seaborn as sns;sns.set();sns.load_dataset('iris')"
194121
195- rem * =================
196- echo finish install PyQtdoc
197- rem * =================
198- if exist " %WINPYDIR% \Scripts\PyQtdoc_win_post_install.bat" " %WINPYDIR% \Scripts\PyQtdoc_win_post_install.bat" " -install"
199-
200122
201123rem * =================
202124echo opengl PyQt5 patch 2018-01-06
@@ -221,56 +143,32 @@ rem * =================
221143rem echo tornado Python-3.8.0 fix 2019-06-28 https://github.com/tornadoweb/tornado/issues/2656#issuecomment-491400255
222144rem * ==================
223145
146+ rem KEEP as example for next time needed
147+
224148set qt56p = %WINPYDIR% \Lib\site-packages\tornado-6.0.3.dist-info
225149if exist " %qt56p% " (
226- %WINPYDIR% \python.exe -c " from winpython.utils import patch_sourcefile;patch_sourcefile(r'%WINPYDIR% \Lib\site-packages\tornado\platform\asyncio.py', 'import asyncio', 'import asyncio;asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) # python-3.8.0' )"
227- echo " DID I patch %qt56p% ??"
228- rem pause
150+ %WINPYDIR% \python.exe -c " from winpython.utils import patch_sourcefile;patch_sourcefile(r'%WINPYDIR% \Lib\site-packages\tornado\platform\asyncio.py', 'import asyncio', 'import asyncio;asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) # python-3.8.0' )"
151+ rem echo "DID I patch %qt56p% ??"
229152) else (
230- echo " I DIDN'T patch of %qt56p% !"
231- rem pause
153+ rem echo "I DIDN'T patch of %qt56p% !"
232154)
233155
234-
235-
236- rem * ===================
237- echo 2018-03-25 Jupyterlab simplified wrap-up (https://github.com/jupyter/notebook/pull/3116#issuecomment-355672998)
238- rem * ===================
239- rem reduce time by building only once
240- rem at each extension do:
241- rem "%WINPYDIR%\Scripts\jupyter.exe" labextension install --no-build
242- rem at the end:
243- rem jupyter lab build
244- rem )
245-
246156echo JUPYTERLAB_DIR=%JUPYTERLAB_DIR% default is ~/.jupyter/lab
247157echo JUPYTERLAB_SETTINGS_DIR=%JUPYTERLAB_SETTINGS_DIR% , default is ~/.jupyter/lab/user-settings/
248158echo JUPYTERLAB_WORKSPACES_DIR=%JUPYTERLAB_WORKSPACES_DIR% , default is ~/.jupyter/lab/workspaces/
249159
250160%WINPYDIR% \Scripts\jupyter.exe" lab path
251161
252162
253-
254- if " %jupyterlab2% " == " 1" if exist " %WINPYDIR% \Lib\site-packages\jupyterlab" (
255- " %WINPYDIR% \Scripts\jupyter.exe" lab build
256- jupyter labextension list
257- )
258-
259163rem jupyter labextension update --all (will rebuild if needed)
164+ rem 2020-12-31 tweaks
165+ rem see https://jupyter.readthedocs.io/en/latest/use/jupyter-directories.html
166+ if exist " %WINPYDIR% \Lib\site-packages\jupyterlab" (
167+ " %WINPYDIR% \Scripts\jupyter.exe" jupyter labextension list
168+ " %WINPYDIR% \Scripts\jupyter.exe" jupyter --paths
169+ )
260170
261-
262-
263-
264- rem * ===================
265- echo remove enum34 from Tensorfow (2017-12-22)
266- rem * ===================
267- if exist " %WINPYDIR% \Lib\site-packages\enum" " %WINPYDIR% \scripts\pip.exe" uninstall -y enum34
268-
269-
270- rem * ===================
271- echo remove typing from altair (2018-11-01)
272- rem * ===================
273- if exist " %WINPYDIR% \Lib\site-packages\typing.py" " %WINPYDIR% \scripts\pip.exe" uninstall -y typing
171+ if exist " %WINPYDIR% \Lib\site-packages\notebook" " %WINPYDIR% \Scripts\jupyter.exe" nbextension list
274172
275173
276174rem * ===================
@@ -310,21 +208,6 @@ if exist "%WINPYDIR%\Lib\site-packages\pipdeptree" pipdeptree
310208@ echo on
311209goto the_end
312210
313- rem ====================
314- rem installation via requirements.txt, requirements2.txt and requirements3.txt files
315- rem ====================
316-
317- rem pip install cvxpy --no-index --find-links=C:\WinPython\packages.srcreq --trusted-host=None
318-
319- set link_srcreq = --find-links=%origin% packages.srcreq
320-
321- set my_req = %origin% requirements.txt
322- if exist %my_req% pip install -r %my_req% --no-index %link_srcreq% --trusted-host=None
323-
324- set my_req = %origin% requirements2.txt
325- if exist %my_req% pip install -r %my_req% --no-index %link_srcreq% --trusted-host=None
326211
327- set my_req = %origin% requirements3.txt
328- if exist %my_req% pip install -r %my_req% --no-index %link_srcreq% --trusted-host=None
329212
330213:the_end
0 commit comments