暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

python学习总结

kikihi 2024-01-12
63


---
title: python学习总结-aCfU9KGb-iMbReFyuj9zh
tags: ['python']

category: ['python']
---

## python环境安装

### anaconda安装

### pip的使用

使用国内镜像源

第一种方式:

```
pip3 install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
```



## jupyter notebook的安装

https://zhuanlan.zhihu.com/p/228114733?utm_id=0

## jupyter notebook插件安装

[jupyter notebook的安装及插件推荐_jupyter notebook插件_优码的博客-CSDN博客](https://blog.csdn.net/jcgeneral/article/details/124790009)

### jupyter_contrib_nbextensions

jupyter notebook默认情况下缺少可视化的插件管理工具,nbextension则在jupyter notebook ui中提供了一个可视化的插件管理工具。

1、代码自动补全插件 Hinterland

2、代码格式化插件 Code prettify

3、代码折叠插件 Codefolding

4、代码执行时间插件 Execute Time

5、输出内容折叠插件 ScrollDown

```
先使用pip安装nbextension:
pip install jupyter_contrib_nbextensions
然后将插件工具栏添加到jupyter notebook页面中:
jupyter contrib nbextension install
```

### jupyterthemes

jupyter notebook原生主题平平淡淡的,如果需要更好的效果就需要修改样式文件,做起来十分麻烦,这时候你就可以安装这个“jupyterthemes”,它给你带来许多不同的炫酷主题。

```undefined
pip install jupyterthemes -i https://pypi.tuna.tsinghua.edu.cn/simple
```

安装完毕之后,可以用命令以下命令来更换主题



```
# 显示可用的主题
$ jt -l

Available Themes:
chesterish
grade3
gruvboxd
gruvboxl
monokai
oceans16
onedork
solarizedd
solarizedl

# 选择主题
$ jt -t grade3

# 修改主题的字体与字号
$ jt -t oceans16 -f fira -fs 13
```


「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论