forked from Radiation-Transport/iWW-GVR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate-jk.bat
36 lines (30 loc) · 973 Bytes
/
create-jk.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@echo off
::
:: Jupyter kernel setup
::
::
:: dvp, Nov 2021
::
set app=%1
if "%app%"=="" (
set app=gvr
)
echo Creating jupyter kernel for conda environment %app%
:: Fix pywin32 version for tornado for python3.9
:: tornado (in jupyter) doesn't work with newer version of pywin, check this on jupyter dependencies updates
:: TODO dvp: check on dependencies updates
:: The following sets version 228 on python3.9 (after pip or poetry it was 300)
:: call conda install pywin32 -y
call conda install jupyterlab -y
:: Create jupyter kernel pointing to the conda environment
call python -m ipykernel install --user --name %app%
if errorlevel 1 (
echo ERROR: something wrong with installing Jupyter kernel for %app% environment
set errorlevel=1
) else (
echo To use %app% environment in jupyter
echo - Run 'jupyter lab'
echo - Open or create notebook
echo - Select kernel %app%
echo - check if 'import iww_gvr' in the notebook works
)