Jupyter可以打开项目目录,并保存图片和代码,对于边写代码边记录结果很友好。
安装步骤是:
1、安装python
2、在项目所在目录下安装jupyter: 打开cmd命令行,执行“pip install jupyter”。以下是执行过程:
C:UsersDELL>pip install jupyter Collecting jupyter Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB) Collecting notebook Downloading notebook-6.4.6-py3-none-any.whl (9.9 MB) |████████████████████████████████| 9.9 MB 79 kB/s Collecting nbconvert Downloading nbconvert-6.3.0-py3-none-any.whl (556 kB) |████████████████████████████████| 556 kB 39 kB/s Collecting ipywidgets Downloading ipywidgets-7.6.5-py2.py3-none-any.whl (121 kB) |████████████████████████████████| 121 kB 27 kB/s Requirement already satisfied: ipykernel in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from jupyter) (6.2.0) Collecting qtconsole Downloading qtconsole-5.2.2-py3-none-any.whl (120 kB) |████████████████████████████████| 120 kB 29 kB/s Collecting jupyter-console Downloading jupyter_console-6.4.0-py3-none-any.whl (22 kB) Requirement already satisfied: tornado<7.0,>=4.2 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from ipykernel->jupyter) (6.1) Requirement already satisfied: ipython<8.0,>=7.23.1 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from ipykernel->jupyter) (7.26.0) Requirement already satisfied: matplotlib-inline<0.2.0,>=0.1.0 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from ipykernel->jupyter) (0.1.2) Requirement already satisfied: traitlets<6.0,>=4.1.0 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from ipykernel->jupyter) (5.0.5) Requirement already satisfied: debugpy<2.0,>=1.0.0 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from ipykernel->jupyter) (1.4.1) Requirement already satisfied: jupyter-client<8.0 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from ipykernel->jupyter) (7.0.1) Collecting nbformat>=4.2.0 Downloading nbformat-5.1.3-py3-none-any.whl (178 kB) |████████████████████████████████| 178 kB 50 kB/s Requirement already satisfied: ipython-genutils~=0.2.0 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from ipywidgets->jupyter) (0.2.0) Collecting jupyterlab-widgets>=1.0.0 Downloading jupyterlab_widgets-1.0.2-py3-none-any.whl (243 kB) |████████████████████████████████| 243 kB 18 kB/s Collecting widgetsnbextension~=3.5.0 Downloading widgetsnbextension-3.5.2-py2.py3-none-any.whl (1.6 MB) |████████████████████████████████| 1.6 MB 22 kB/s Requirement already satisfied: pygments in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from jupyter-console->jupyter) (2.10.0) Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from jupyter-console->jupyter) (3.0.20) Requirement already satisfied: entrypoints>=0.2.2 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from nbconvert->jupyter) (0.3) Collecting bleach Downloading bleach-4.1.0-py2.py3-none-any.whl (157 kB) |████████████████████████████████| 157 kB 29 kB/s Collecting mistune<2,>=0.8.1 Downloading mistune-0.8.4-py2.py3-none-any.whl (16 kB) Requirement already satisfied: jupyter-core in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from nbconvert->jupyter) (4.7.1) Collecting jupyterlab-pygments Downloading jupyterlab_pygments-0.1.2-py2.py3-none-any.whl (4.6 kB) Collecting pandocfilters>=1.4.1 Downloading pandocfilters-1.5.0-py2.py3-none-any.whl (8.7 kB) Collecting jinja2>=2.4 Downloading Jinja2-3.0.3-py3-none-any.whl (133 kB) |████████████████████████████████| 133 kB 30 kB/s Collecting testpath Downloading testpath-0.5.0-py3-none-any.whl (84 kB) |████████████████████████████████| 84 kB 14 kB/s Collecting nbclient<0.6.0,>=0.5.0 Downloading nbclient-0.5.9-py3-none-any.whl (69 kB) |████████████████████████████████| 69 kB 28 kB/s Collecting defusedxml Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB) Collecting argon2-cffi Downloading argon2_cffi-21.3.0-py3-none-any.whl (14 kB) Requirement already satisfied: nest-asyncio>=1.5 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from notebook->jupyter) (1.5.1) Collecting terminado>=0.8.3 Downloading terminado-0.12.1-py3-none-any.whl (15 kB) Requirement already satisfied: pyzmq>=17 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from notebook->jupyter) (22.2.1) Collecting prometheus-client Downloading prometheus_client-0.12.0-py2.py3-none-any.whl (57 kB) |████████████████████████████████| 57 kB 17 kB/s Collecting Send2Trash>=1.8.0 Downloading Send2Trash-1.8.0-py3-none-any.whl (18 kB) Collecting qtpy Downloading QtPy-1.11.3-py2.py3-none-any.whl (59 kB) |████████████████████████████████| 59 kB 33 kB/s Requirement already satisfied: backcall in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from ipython<8.0,>=7.23.1->ipykernel->jupyter) (0.2.0) Requirement already satisfied: colorama in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from ipython<8.0,>=7.23.1->ipykernel->jupyter) (0.4.4) Requirement already satisfied: jedi>=0.16 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from ipython<8.0,>=7.23.1->ipykernel->jupyter) (0.18.0) Requirement already satisfied: setuptools>=18.5 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from ipython<8.0,>=7.23.1->ipykernel->jupyter) (58.1.0) Requirement already satisfied: decorator in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from ipython<8.0,>=7.23.1->ipykernel->jupyter) (5.0.9) Requirement already satisfied: pickleshare in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from ipython<8.0,>=7.23.1->ipykernel->jupyter) (0.7.5) Collecting MarkupSafe>=2.0 Downloading MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl (14 kB) Requirement already satisfied: python-dateutil>=2.1 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from jupyter-client<8.0->ipykernel->jupyter) (2.8.2) Requirement already satisfied: pywin32>=1.0 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from jupyter-core->nbconvert->jupyter) (301) Collecting jsonschema!=2.5.0,>=2.4 Downloading jsonschema-4.3.1-py3-none-any.whl (71 kB) |████████████████████████████████| 71 kB 61 kB/s Requirement already satisfied: wcwidth in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->jupyter-console->jupyter) (0.2.5) Collecting pywinpty>=1.1.0 Downloading pywinpty-1.1.6-cp39-none-win_amd64.whl (1.4 MB) |████████████████████████████████| 1.4 MB 23 kB/s Collecting argon2-cffi-bindings Downloading argon2_cffi_bindings-21.2.0-cp36-abi3-win_amd64.whl (30 kB) Collecting packaging Downloading packaging-21.3-py3-none-any.whl (40 kB) |████████████████████████████████| 40 kB 23 kB/s Requirement already satisfied: six>=1.9.0 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from bleach->nbconvert->jupyter) (1.16.0) Collecting webencodings Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB) Requirement already satisfied: parso<0.9.0,>=0.8.0 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from jedi>=0.16->ipython<8.0,>=7.23.1->ipykernel->jupyter) (0.8.2) Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 Downloading pyrsistent-0.18.0-cp39-cp39-win_amd64.whl (62 kB) |████████████████████████████████| 62 kB 37 kB/s Collecting attrs>=17.4.0 Downloading attrs-21.2.0-py2.py3-none-any.whl (53 kB) |████████████████████████████████| 53 kB 28 kB/s Collecting cffi>=1.0.1 Downloading cffi-1.15.0-cp39-cp39-win_amd64.whl (180 kB) |████████████████████████████████| 180 kB 29 kB/s Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in c:usersdellappdatalocalprogramspythonpython39libsite-packages (from packaging->bleach->nbconvert->jupyter) (2.4.7) Collecting pycparser Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB) |████████████████████████████████| 118 kB 25 kB/s Installing collected packages: pyrsistent, attrs, pycparser, jsonschema, webencodings, packaging, nbformat, MarkupSafe, cffi, testpath, pywinpty, pandocfilters, nbclient, mistune, jupyterlab-pygments, jinja2, defusedxml, bleach, argon2-cffi-bindings, terminado, Send2Trash, prometheus-client, nbconvert, argon2-cffi, notebook, widgetsnbextension, qtpy, jupyterlab-widgets, qtconsole, jupyter-console, ipywidgets, jupyter Successfully installed MarkupSafe-2.0.1 Send2Trash-1.8.0 argon2-cffi-21.3.0 argon2-cffi-bindings-21.2.0 attrs-21.2.0 bleach-4.1.0 cffi-1.15.0 defusedxml-0.7.1 ipywidgets-7.6.5 jinja2-3.0.3 jsonschema-4.3.1 jupyter-1.0.0 jupyter-console-6.4.0 jupyterlab-pygments-0.1.2 jupyterlab-widgets-1.0.2 mistune-0.8.4 nbclient-0.5.9 nbconvert-6.3.0 nbformat-5.1.3 notebook-6.4.6 packaging-21.3 pandocfilters-1.5.0 prometheus-client-0.12.0 pycparser-2.21 pyrsistent-0.18.0 pywinpty-1.1.6 qtconsole-5.2.2 qtpy-1.11.3 terminado-0.12.1 testpath-0.5.0 webencodings-0.5.1 widgetsnbextension-3.5.2
3、打开jupyter notebook,在cmd命令行执行“jupyter notebook”。以下是运行过程:
C:UsersDELL>jupyter notebook [I 16:31:12.112 NotebookApp] Writing notebook server cookie secret to C:UsersDELLAppDataRoamingjupyterruntimenotebook_cookie_secret [I 16:31:12.776 NotebookApp] Serving notebooks from local directory: C:UsersDELL [I 16:31:12.777 NotebookApp] Jupyter Notebook 6.4.6 is running at: [I 16:31:12.777 NotebookApp] http://localhost:8888/?token=f2ffd0c4005f40d14d0d91e41766fb8da200cdb281eafbee [I 16:31:12.777 NotebookApp] or http://127.0.0.1:8888/?token=f2ffd0c4005f40d14d0d91e41766fb8da200cdb281eafbee [I 16:31:12.777 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip /confirm/iation). [C 16:31:12.853 NotebookApp] To access the notebook, open this file in a browser: file:///C:/Users/DELL/AppData/Roaming/jupyter/runtime/nbserver-15308-open.html Or copy and paste one of these URLs: http://localhost:8888/?token=f2ffd0c4005f40d14d0d91e41766fb8da200cdb281eafbee or http://127.0.0.1:8888/?token=f2ffd0c4005f40d14d0d91e41766fb8da200cdb281eafbee [I 16:33:02.111 NotebookApp] Creating new file
在浏览器里可以新建一个text,就可以开始记录啦。
使用心得,后续更新~
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)