Ipython notebook cannot start up (Windows 8.1)
Question: I'm using a Japanese version of windows 8.1 installed on my computer. The
problem is that my windows is in japanese as such I'm not able to use ipython
to open up .pynb files...Do anyone have similar issues? I will appreciate all
help provided. Thank you.

The error message is as shown below. [C 23:46:56.016 NotebookApp] Bad config
encountered during initialization: [C 23:46:56.016 NotebookApp] Could not
decode 'C:\Users\x83\x86\x81[\x83W\x81 [\x83\x93.jupyter' for unicode trait
'config_dir' of a NotebookApp instance.


Answer: Python 2.7 have issues with non-ascii environment variable values. Jypyter
uses environment variables to get "home" and "appdata" directories. Good thing
Jypyter have it's own environment variables to override defaults (you can
check it in `C:\Python27\Lib\site-packages\jupyter_core\paths.py` and
`C:\Python27\Lib\site-packages\jupyter_core\migrate.py`):
`JUPYTER_CONFIG_DIR`, `JUPYTER_DATA_DIR`, `JUPYTER_RUNTIME_DIR`,`IPYTHONDIR`.
You need to set them to existing non-unicode destinations. Create symlink to
C:\users\\.ipython in C:\data run `mklink /J C:\data\.ipython
"%USERPROFILE%\.ipython"` in console. I wrote script for that (`C:\data` must
exist (assuming you have Python 2.7 and it is in `C:\Python27`)). I run this
script instead of `ipython notebook`. (You also need to create symlink to
C:\users\\.ipython in `C:\data`, run `mklink /J C:\data\.ipython
"%USERPROFILE%\.ipython"` in console (cmd.exe))

    
    
    import os
    import subprocess
    
    base = 'C:\\data'
    jupyter_dir = os.path.join(base,'.jupyter')
    if not os.path.exists(jupyter_dir):
      os.mkdir(jupyter_dir)
    
    dirs = {'JUPYTER_CONFIG_DIR' : jupyter_dir, 'JUPYTER_RUNTIME_DIR' : os.path.join(jupyter_dir,'runtime'),'JUPYTER_DATA_DIR' : os.path.join(jupyter_dir,'data')}
    
    for k,v in dirs.iteritems():
      if not os.path.exists(v):
        os.mkdir(v)
      os.environ[k] = v
    
    ipython_dir = os.path.join(base,'.ipython')
    
    os.environ['IPYTHONDIR'] = ipython_dir
    
    subprocess.call(['C:\\Python27\\Scripts\\jupyter-notebook.exe'])
    

I know, butchering directory tree is not elegant solution, but it works.

