1. 程式人生 > >jupyter安裝出現問題:安裝後無法打開

jupyter安裝出現問題:安裝後無法打開

color itl let ould 出現 無法 AMM 問題: spa

jupyter安裝出現問題:安裝後無法打開

traitlets.traitlets.TraitError: Could not decode ‘C:\Users\\xce\xa2\xcc\xf0\xd0\xc4\xd3\xef\.jupyter‘ for unicode trait ‘config_dir‘ of a NotebookApp instance.

解決辦法:將下面一段代碼保存為py文件,文件名為“python jupyter_nootbook_start.py”,以後運行該文件即可打開jupyter。

import os
import subprocess
?
#base = ‘D:\\Anaconda‘ base = D:\ProgrammingTool\python\Ana\Anaconda 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([D:\ProgrammingTool\python\Ana\Anaconda\Scripts\jupyter-notebook.exe
]) ?

jupyter安裝出現問題:安裝後無法打開