Jupyter notebook 安装 -- macbook Pro

作者&投稿:洪鱼 (若有异议请与网页底部的电邮联系)
~ mac环境:MacBook Pro (Retina, 13-inch, Mid 2014),参见文章 Jupyter Notebooks 入门 ,按此文安装

操作如下:

xxx-laptop:~ xxx$python3 -m pip install --upgrade pip

xxx-laptop:~ xxx$ python3 -m pip install jupyter

结果如下:

Collecting jupyter

  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x1023cdc50>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)': /simple/jupyter/

...

  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x1023cd0f0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)': /simple/jupyter/

  Could not find a version that satisfies the requirement jupyter (from versions: )

No matching distribution found for jupyter

多次重试无效。

网上搜索错误“Could not find a version that satisfies the requirement jupyter”,有很多文章,没有按文章重试。

改用如下命令:

xxx-laptop:~ xxx$ pip3 install jupyter

结果:

Collecting jupyter

  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x10a3f87f0>: Failed to establish a new connection: [Errno 65] No route to host',)': /packages/83/df/0f5dd132200728a86190397e1ea87cd76244e42d39ec5e88efd25b2abd7e/jupyter-1.0.0-py2.py3-none-any.whl

....

Exception:

Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/connection.py", line 141, in _new_conn

    (self.host, self.port), self.timeout, **extra_kw)

  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/util/connection.py", line 83, in create_connection

    raise err

  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/util/connection.py", line 73, in create_connection

    sock.connect(sa)

OSError: [Errno 65] No route to host

....

0x10a417e80>: Failed to establish a new connection: [Errno 65] No route to host',))

You are using pip version 9.0.3, however version 20.1.1 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.

xxx-laptop:~ xxx$ pip3 install --upgrade pip

Collecting pip

  Downloading https://files.pythonhosted.org/packages/43/84/23ed6a1796480a6f1a2d38f2802901d078266bda38388954d01d3f2e821d/pip-20.1.1-py2.py3-none-any.whl (1.5MB)

    100% |████████████████████████████████| 1.5MB 91kB/s

Installing collected packages: pip

  Found existing installation: pip 9.0.3

    Uninstalling pip-9.0.3:

      Successfully uninstalled pip-9.0.3

Successfully installed pip-20.1.1

升级PIP后,再次pip install jupyter

xxx-laptop:~ xxx$ pip install jupyter

Collecting jupyter

  Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)

Collecting jupyter-console

  Downloading jupyter_console-6.1.0-py2.py3-none-any.whl (21 kB)

Collecting qtconsole

  Downloading qtconsole-4.7.4-py2.py3-none-any.whl (118 kB)

    |████████████████████████████████| 118 kB 10 kB/s

Collecting nbconvert

  Downloading nbconvert-5.6.1-py2.py3-none-any.whl (455 kB)

    |████████████████████████████████| 455 kB 95 kB/s

...

完成后,执行jupyter:

jupyter

usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir]

              [--paths] [--json]

              [subcommand]

...

成功。

xxx-laptop:~ xxx$ jupyter notebook --generate-config

xxx-laptop:~ xxx$ cd .jupyter/

修改jupyter_notebook_config.py

c.NotebookApp.browser = u'chrome'

c.NotebookApp.notebook_dir = '/Users/xxx/workspace/jupyter'

c.NotebookApp.open_browser = True

保存,重启就可以了。


肇东市18973067043: jupyter notebook怎么用 -
武衬博洛: notebook 界面由以下部分组成: notebook 的名称 主工具栏,提供了保存、导出、重载 notebook,以及重启内核等选项 快捷键 notebook 主要区域,包含了 notebook 的内容编辑区 慢慢熟悉这些菜单和选项.如果想要详细了解有关 notebook ...

肇东市18973067043: jupyter notebook怎么配置 -
武衬博洛: PythonJupyter Notebook各种使用方法记录持续更新 一 Jupyter NoteBook的安装 1 新版本Anaconda自带Jupyter 2 老版本Anacodna需自己安装Jupyter 二 更改Jupyter notebook的工作空间 1 Jupyter的工作空间在哪里指定 2 如何找到该配置文件 三...

肇东市18973067043: ipython notebook jupyter什么东东 -
武衬博洛: 个人理解仅供参考.ipython - jupyter的内核,jupyter notebook打开看起来是一个网页端的笔记本(notebook) ,它本质是python运行的一个壳(shell),这个shell集成了很多工具包,所以通过这个shell来编辑和运行phython会非常方便(有了各种工具包的支持),具体有哪些更方便的功能可以参考http://ipython.org/ .此答案未必精准,仅供参考,请勿乱抄.

肇东市18973067043: jupyter notebook 有哪些快捷键 -
武衬博洛: 命令模式 (按键 Esc 开启)Enter : 转入编辑模式 Shift-Enter : 运行本单元,选中下个单元 Ctrl-Enter : 运行本单元 Alt-Enter : 运行本单元,在其下插入新单元 Y : 单元转入代码状态 M :单元转入markdown状态 R : 单元转入raw状态 1 :...

肇东市18973067043: ubuntu下怎么安装jupyter notebook -
武衬博洛: 一、jupyter notebook是什么 官网的介绍是:Jupyter Notebook是一个Web应用程序,允许您创建和共享包含实时代码,方程,可视化和说明文本的文档. 用途包括:数据清理和转换,数值模拟,统计建模,机器学习等等.简单的介绍就是:...

肇东市18973067043: jupyter怎样在mac上安装 -
武衬博洛: 安装流程大致分为三步 1. 安装[python2.7.13](https://www.python.org/downloads/release/python-2713/) 下载python2.7.13安装包.一路next.安装完成后在cmd 下输入python 测试python安装成功. 2. 安装[setuptools](https://pypi.python.org/pypi/...

肇东市18973067043: jupyter notebook python 怎么打开 -
武衬博洛: Ipython notebook么? 如果是的话,现在应该改成jupyter 了 进入jupyter notebook 后可以使用tab进行函数名及变量名的补全.

肇东市18973067043: 如何让Jupyter Notebook支持多种编程语言 -
武衬博洛: 在《 》一文中,有眼尖的同学发现我在Jupyter Notebook新建笔记本时,菜单里有多个选项.这就意味着我可以直接新建支持Python 2,Python 3,甚至是R语言的笔记本.可是当你自己安装了Anaconda后,新建笔记本的选项却是这样的.你可能...

肇东市18973067043: 如何修改jupyter notebook的默认工作路径 -
武衬博洛: 1. 找到Python安装路径下的Script文件,找到jupyter-notebook.exe,发送快捷方式到桌面. 2. 在桌面的jupyter-notebook快捷方式中,右键属性,修改起始位置. 3. 下次打开时,直接双击桌面的快捷方式即可.

肇东市18973067043: python小白的jupyter notebook突然打不开了 -
武衬博洛: 原因并不清楚,似乎是jupyter的kernel默认的环境变量是python3.5解决方法为手动注册python3.6python3.6 -m pip install ipykernel python3.6 -m ipykernel install --user

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 星空见康网