报错:
[C 15:23:52.721 NotebookApp] Bad config encountered during initialization:
[C 15:23:52.723 NotebookApp] Could not decode 'C:\\Users\\\xc5\xf4\\.jupyter' for unicode trait 'config_dir' of a NotebookApp instance.
解决办法:
将以下内容拷贝到一个py 文件里面(jupyter_nootbook_start.py):
import os
import subprocess
#base = 'C:\\data'
base = 'G:\\Anaconda2'
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(['G:\\Anaconda2\\Scripts\\jupyter-notebook.exe'])
然后用Python运行此文件:
python jupyter_nootbook_start.py