jupyter运行环境安装与使用

jupyter运行环境安装与使用

所有文章不设限,我们相遇偶然,相散坦然,互不打扰,各自安好,向阳而生

一.利用python环境,使用pip命令安装

1. 安装jupyter的方式

此处省去对于python环境的相关配置,直接介绍如何安装 jupyter 环境

打开cmd,输入如下命令

pip install jupyter

等待运行成功,jupyter环境即为安装完毕

然后cmd命令窗口直接输入如下命令,启动jupyter

Jupyter notebook

将会启动jupyter环境

2. jupyter的中文配置

打开环境变量,在环境变量中添加如下

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-SrkHqRSR-1669947735447)(C:\Users\ASUS\AppData\Roaming\Typora\typora-user-images\image-20221111233130364.png)]

然后打开jupyter显示即为中文

3.配置jupyter的自动提示

安装nbextensions

在cmd终端环境中输入下列代码(就是打开命令符窗口)

pip install jupyter_contrib_nbextensions

上面安装完成后执行下列代码

jupyter contrib nbextension install --user --skip-running-check

安装完成后,勾选 “Table of Contents” 以及 “Hinterland”。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Od5MK9s2-1669947735448)(C:\Users\ASUS\AppData\Roaming\Typora\typora-user-images\image-20221111233426042.png)]

4. 配置jupyter的主题

在cmd中输入以下命令:

 pip install jupyterthemes

在cmd中执行命令如下,列出所有主题

jt -l 

列出的即为主题目录,选定一个主题执行如下命令 jt -t 【主题名】-T -N

jt -t monokai -T -N

主题将会设置完成,此处给出优秀博客链接

https://blog.csdn.net/qq_41566627/article/details/104984796?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7.control&dist_request_id=&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7.control

5. 配置pip的国内源

国内源地址

清华大学:https://pypi.tuna.tsinghua.edu.cn/simple
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
阿里云:http://mirrors.aliyun.com/pypi/simple/
腾讯云:https://mirrors.cloud.tencent.com/pypi/simple
华为云:https://repo.huaweicloud.com/repository/pypi/simple
豆瓣:http://pypi.douban.com/simple/
网易:http://mirrors.163.com

使用cmd可以执行如下命令,完成pip国内源配置,加速模块安装 pip config set global.index-url 【国内源地址】

pip config set global.index-url http://mirrors.aliyun.com/pypi/simple
6. 配置项目启动目录

第一种:在指定目录下打开cmd,启动jupyter

第二种:打开jupyter的安装配置,一般在pythongen目录的Scripts中,找到jupyter-notebook.exe可执行文件,然后创建快捷方式到桌面,参考下图设置”目标”框,把引号里的内容,替换为要是使用的工作目录。

img

二.利用anconda的集成环境

此处不多赘述,相关设置参考如上即可,不过不是在cmd中执行,将会报错找不到命令

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-VtqOPWCU-1669947735449)(C:\Users\ASUS\AppData\Roaming\Typora\typora-user-images\image-20221111235556588.png)]

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
社会演员多的头像社会演员多普通用户
上一篇 2023年6月11日
下一篇 2023年6月11日

相关推荐