Sublime Text4 配置 Python3 环境、代码提示、编译报错的解决方案
作者:徒手写Bug 时间:2021-09-24 12:00:03
1 配置 Python3 环境
单击 工具 > 编译系统 > 新建编译系统...
弹出:
替换里面的内容为:
{
"cmd":["G:\\CodeTools\\anaconda3\\python.exe","-u","$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"encoding": "utf-8" ,
"env": {"PYTHONIOENCODING": "utf8"},
"shell":"true"
}
将 cmd 中的地址替换为你的 Python3 的程序地址,如我 Python3 的程序地址为:"G:\\CodeTools\\anaconda3\\python.exe"
按 Ctrl + S
弹出对话框,可自行修改文件名为 Python3 其保留文件后缀,单击保存
保存后 单击 工具 > 编译系统 > Python3
选中:
默认编译快捷键为 Ctrl + B
测试:
2 配置自动代码提示
按 Ctrl + Shift + P
,输入 install
,选中第一个按 Enter
:
然后输入 anaconda
选中第一个按 Enter
:
等待安装完后,弹出:
重新启动 Sublime Text4 测试,输入 import
+ 空格
弹出:
完成。
3 编译报错
如果编译时遇到如下错误 __init__() got an unexpected keyword argument ‘kill_previous’
,单击 首选项 > 浏览插件目录...
弹出目录,删除 Default
文件:
重启 Sublime Text4,再次编译即可解决问题。
来源:https://blog.csdn.net/m0_53946217/article/details/117794159
标签:Sublime,Text4,Python3,代码提示,编译报错
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
书写高效的CSS - 漫谈CSS的渲染效率
2008-07-13 14:20:00
标签水平右对齐更适合中文网站
2009-05-01 11:54:00
![](https://img.aspxhome.com/file/UploadPic/20095/1/01-51s.gif)
支持多风格变换的ASP分页类
2007-10-13 18:48:00
OpenSearch 初探
2008-06-19 12:06:00
![](https://img.aspxhome.com/file/UploadPic/20086/19/2008619121131785s.png)
Microsoft SQL Server 安全问题
2010-07-26 13:20:00
Javascript简写条件语句(推荐)
2023-09-01 04:10:25
python数据可视化Seaborn画热力图
2022-01-17 22:55:05
![](https://img.aspxhome.com/file/2023/3/65063_0s.png)
编程活动中几个不良现象
2008-09-01 12:23:00
5招优化MySQL插入方法
2009-04-02 10:49:00
Python打印特殊符号及对应编码解析
2023-08-16 02:14:07
![](https://img.aspxhome.com/file/2023/8/67388_0s.png)
python利用线程生成不同尺寸的缩略图实例详解
2023-07-07 08:47:55
利用Django-environ如何区分不同环境
2022-01-10 10:52:24
Oracle数据表分区的策略
2010-07-28 12:59:00
fso怎样判断一个盘上是否有文件
2007-09-26 12:35:00
python中join与os.path.join()函数实例详解
2023-08-23 19:20:51
![](https://img.aspxhome.com/file/2023/6/62866_0s.png)
ThinkPHP中__initialize()和类的构造函数__construct()用法分析
2023-07-08 01:26:24
MYSQL教程:如何选择正确的数据列类型
2009-02-27 16:05:00
asp 小偷采集程序原理与常用函数方法
2011-03-06 10:36:00
Web页面空间利用率的思考
2009-07-03 12:45:00
Python利用os模块实现自动删除磁盘文件
2023-04-06 17:04:37
![](https://img.aspxhome.com/file/2023/9/70769_0s.png)