Kotlin / kotlin-jupyter

Kotlin kernel for Jupyter/IPython
Apache License 2.0
1.09k stars 106 forks source link

Adding new kernel fails with python <3.8 #380

Open ileasile opened 1 year ago

ileasile commented 1 year ago

Fails because the unsupported feature is used in install script:

Installing kernel to /Users/pavel.gorgulov/Library/Jupyter/kernels/kotlin_JDK_11_kernel
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/anaconda3/lib/python3.7/site-packages/kotlin_kernel/__main__.py", line 32, in <module>
    main(sys.argv)
  File "/opt/anaconda3/lib/python3.7/site-packages/kotlin_kernel/__main__.py", line 24, in main
    commands[command](args)
  File "/opt/anaconda3/lib/python3.7/site-packages/kotlin_kernel/__main__.py", line 5, in <lambda>
    commands = {'add-kernel': lambda x: add_kernel(x), 'detect-jars-location': 
  File "/opt/anaconda3/lib/python3.7/site-packages/kotlin_kernel/add_kernel.py", line 83, in add_kernel
    install_base_kernel(kernel_name)
  File "/opt/anaconda3/lib/python3.7/site-packages/kotlin_kernel/install_user.py", line 32, in install_base_kernel
    shutil.copytree(src, dst, dirs_exist_ok=True)
TypeError: copytree() got an unexpected keyword argument 'dirs_exist_ok'

Either state in the documentation that only python >= 3.8 should be used, or rewrite it to support lower versions.

Cxxshyy commented 1 year ago

Hi id be looking to take this issue but could you give me some guidance on how i would rewrite it to be able to support lower versions

EmmanuelDav commented 1 year ago

@ileasile is this issue still Open?