Jupyter Notebook [C 01:43:22.829 NotebookApp]解决方案

在Anaconda Prompt中添加且更换到python27的环境,但jupyter notebook启动不了,
Prompt中显示如下:
 


(python26) D:\>Jupyter Notebook
The Jupyter HTML Notebook.This launches a Tornado based HTML Notebook Server that serves up an
HTML5/Javascript Notebook client.Subcommands
-----------Subcommands are launched as `jupyter-notebook cmd [args]`. For information on
using subcommand 'cmd', do: `jupyter-notebook cmd -h`.password
Set a password for the notebook server.
list
List currently running notebook servers.Options
-------Arguments that take values are actually convenience aliases to full
Configurables, whose aliases are listed on the help line. For more information
on full configurables, see '--help-all'.--script
DEPRECATED, IGNORED
--pylab
DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.
--debug
set log level to logging.DEBUG (maximize logging output)
--no-browser
Don't open the notebook in a browser after startup.
--allow-root
Allow the notebook to be run from root user.
-y
Answer yes to any questions instead of prompting.
--no-mathjax
Disable MathJax MathJax is the javascript library Jupyter uses to render math/LaTeX. It is
very large, so you may want to disable it if you have a slow internet
connection, or for offline use of the notebook. When disabled, equations etc. will appear as their untransformed TeX source.
--no-script
DEPRECATED, IGNORED
--generate-config
generate default config file
--certfile= (NotebookApp.certfile)
Default: u''
The full path to an SSL/TLS certificate file.
--ip= (NotebookApp.ip)
Default: 'localhost'
The IP address the notebook server will listen on.
--pylab= (NotebookApp.pylab)
Default: 'disabled'
DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.
--log-level= (Application.log_level)
Default: 30
Choices: (0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL')
Set the log level by value or name.
--port-retries= (NotebookApp.port_retries)
Default: 50
The number of additional ports to try if the specified port is not
available.
--notebook-dir= (NotebookApp.notebook_dir)
Default: u''
The directory to use for notebooks and kernels.
--keyfile= (NotebookApp.keyfile)
Default: u''
The full path to a private key file for usage with SSL/TLS.
--client-ca= (NotebookApp.client_ca)
Default: u''
The full path to a certificate authority certificate for SSL/TLS client
authentication.
--config= (JupyterApp.config_file)
Default: u''
Full path of a config file.
--port= (NotebookApp.port)
Default: 8888
The port the notebook server will listen on.
--transport= (KernelManager.transport)
Default: 'tcp'
Choices: [u'tcp', u'ipc']
--browser= (NotebookApp.browser)
Default: u''
Specify what command to use to invoke a web browser when opening the
notebook. If not specified, the default browser will be determined by the
`webbrowser` standard library module, which allows setting of the BROWSER
environment variable to override it.To see all available configurables, use `--help-all`Examples
-------- jupyter notebook # start the notebook
jupyter notebook --certfile=mycert.pem # use SSL/TLS certificate
jupyter notebook password # enter a password to protect the server[C 01:43:22.812 NotebookApp] Bad config encountered during initialization:
[C 01:43:22.829 NotebookApp] Could not decode 'C:\\Users\\\xc5\xed\xcf\xd4\xb9\xa2\\.jupyter' for unicode trait 'config_dir' of a NotebookApp instance.

首先,在控制台运行jupyter notebook --generate-config

接着根据你运行实际显示的路径,打开这个配置文件(可以用notepad++,submile Text3,甚至记事本等软件打开各种格式的文件),我电脑上是这个文件C:\Users\用户\.jupyter\jupyter_notebook_config.py

然后在通过搜索关键词:c.NotebookApp.notebook_dir,定位到下面这行,我的工作目录是E盘下的quant(我是宽客哈哈),然后就保存之后,就不会再出现这个问题了

Jupyter Notebook [C 01:43:22.829 NotebookApp]解决方案_第1张图片

就好了

Jupyter Notebook [C 01:43:22.829 NotebookApp]解决方案_第2张图片

你可能感兴趣的:(python学习)