Jupyter Notebook Server密码无效

Ken*_*ers 13 python anaconda jupyter

我使用了此处的设置说明:http: //jupyter-notebook.readthedocs.io/en/latest/public_server.html

启动服务器后,每次我尝试登录时都拒绝接受我的密码.我已经验证了哈希,使用了notebook.auth中的passwd()函数作为sha1生成器.

最后,密码值在jupyter_notebook_config.py文件中设置.

这里有什么我想念的东西.我可以看到POST请求和所有内容,但它不会占用我设置的密码.

到目前为止,一些谷歌搜索没有发现任何事情.我在Linux Mint 17上使用Anaconda v1.5.1发行版.谢谢

小智 9

我能够设置密码并使用它登录。我没有运气跑jupyter notebook password,但jupyter server password确实工作。


小智 6

  1. 生成配置文件: jupyter notebook --generate-config

  2. 生成密码:jupyter notebook password和(输入密码2次)。这应该生成一个 jupyter_notebook_config.json 文件或在当前配置路径中更改它。

  3. jupyter_notebook_config.py 文件的搜索路径。(通常在路径/.jupyter 中):

    • jupyter --path
  4. 取消注释并将json配置文件添加到配置文件中:jupyter_notebook_config.py

    • c.JupyterApp.config_file_name = 'jupyter_notebook_config.json'


Eri*_*ins 5

您可以在文件jupyter notebook --generate-config生成的文件中对所有选项进行配置。这将生成一个文件,其中所有配置都在文件夹〜/ .jupyter / jupyter_notebook_config.py中进行了解释和注释。

在此文件中,您可以取消注释

## Allow password to be changed at login for the notebook server.
#
#  While loggin in with a token, the notebook server UI will give the opportunity
#  to the user to enter a new password at the same time that will replace the
#  token login mechanism.
#
#  This can be set to false to prevent changing password from the UI/API.
c.NotebookApp.allow_password_change = True
and set some starting or no token with

## Token used for authenticating first-time connections to the server.
#
#  When no password is enabled, the default is to generate a new, random token.
#
#  Setting to an empty string disables authentication altogether, which is NOT
#  RECOMMENDED.
c.NotebookApp.token = ''
Run Code Online (Sandbox Code Playgroud)

对于简单的单个密码:在jupyter_notebook_config.py中

#my notebooks settings
c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 5000

# setting up the password
from IPython.lib import passwd
password = passwd("your_secret_password")
c.NotebookApp.password = password
Run Code Online (Sandbox Code Playgroud)

另请参阅此处的文档:https:


Dog*_*kan 1

我也有同样的问题。尝试在同一目录中运行笔记本服务器jupyter_notebook_config.py。这解决了我的问题。