achesnais / clj-jupyter

A Clojure Kernel for Jupyter Notebooks
Eclipse Public License 1.0
43 stars 12 forks source link

windows support #1

Open rogerallen opened 8 years ago

rogerallen commented 8 years ago

Thanks for making this. I was able to get this working on Windows 10. To potentially help others, I did this:

  1. I use the git bash environment which doesn't have make installed, so I just converted your Makefile to a shell script make.sh.
  2. this doc indicates the Linux/Mac/Windows spots for installing user kernels is:

    • ~/Library/Jupyter/kernels (Mac which you support)
    • ~/.local/share/jupyter/kernels (Linux)
    • %APPDATA%\jupyter\kernels (Windows)

    For me %APPDATA% is C:\Users\rallen\AppData\Roaming. So, I was able to do the jar copy like so (note the git bash style path)

    INSTALL_DIR=/c/Users/rallen/AppData/Roaming/jupyter/kernels/clojure
    mkdir -p $INSTALL_DIR
    cp -f target/IClojure.jar $INSTALL_DIR/IClojure.jar
  3. Finally, for kernel.json file, it appears that jupyter wants a windows-style path, I just hand edited it, but I'm sure a sed command could do this with enough backslashes. :smile:

      "C:\\Users\\rallen\\AppData\\Roaming\\jupyter\\kernels\\clojure\\IClojure.jar",

Hopefully this gives some hints for supporting more environments. Cheers.

achesnais commented 7 years ago

@rogerallen wow – thank you so much!

When I have a moment I'll look more carefully and will see how I can update the makefile to support this.

I must admit my windows knowledge is a bit rusty so you're a lifesaver.