1 spyder

修改图片大小:

修改上面的图片加载的语句最后的数字即可,例,可将620改成1240或其他数据,图片会相应变化大小。
安装:
CMD中 pip install spyder
2 Visual Studio Code
1.2.1 linux中的设置
以deepin 20为例。
在deepin 20中,同时存在有python2和python3两种python。其中Python2的默认是python
,而python3的启动是python3
。安装VS code后若不进行配置,则会发生直接调用python2的情况。其设置流程如下:
1)点击设置
按钮。

2)再点击
设置
。
3)搜索pythonPath

4)在搜索结果中找到Python Path
,并在下面填入“python3”或是相应的路径\usr\bin\python3
,然后保存退出。

5)设置完成,重启VS code即可。
3、Geany——轻快的编辑器
是我的入门编辑器,小巧简单好用。

4、NovalIDE
国产轻量级IDE,和Geany类似,小巧玲珑。

5 jupyter notebook
5.1 anaconda中的Jupyter notebook的默认工作路径调整
【1】直接搜索jupyter_notebook_config.py
文件。

【2】然后打开文件,搜索
c.NotebookApp.notebook_dir

【3】搜索到后,修改默认工作目录,并将最前面的注释符号
#
删除,保存退出即可。
5.2 导出pdf
5.2.1 LaTex方式导出pdf
Jupyter notebook导出pdf文档时,不能正确显示中文。在各种组件安装完成后,也是不能正确显示中文的。此时可以采用以下方法操作。
[1] 不要点击PDF via LaTex (.pdf)
,而是选择LaTex (.tex)
下载文件。

[2] 打开下载的tex文件,本例中是使用的miktex软件。双击即可自动打开。定位到\documentclass[11pt]{article}
一段,将其中的article
修改为ctexart
并保存。


[3] 点击生成pdf。

[4] 生成后的效果如图,可见已支持中文。

5.1 pyppeteer方式导出pdf
使用该方式导出,会有如下错误提示。
nbconvert failed: No suitable chromium executable found on the system. please use '--allow-chromium-download' to allow downlaoding one.

[解决方法]:
直接在文件夹中使用命令行模式jupyter nbconvert --to webpdf --allow-chromium-download 1.ipynb
,针对1.ipynb
文件转换一次。转换时,会自动下载所需组件。转换完成后,再在Jupyter notebook中点击即可正确转换。
如果没有nbconvert
,则需要先安装 pip install nbconvert[webpdf]
。
VS code
VS Code 解释器乱码的解决办法

网友评论