python的开发工具中,有比较轻量的编辑器:
1,sublime text
官网: Sublime Text - Text Editing, Done RightSublime Text is a sophisticated text editor for code, markup and prose. You'll love the slick user interface, extraordinary features and amazing performance.http://www.sublimetext.com/
说明:对windows/macos/linux三个平台都提供相应版本的下载
可免费使用
也有比较完善的IDE:
1,vscode
官网: Visual Studio Code - Code Editing. RedefinedVisual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.https://code.visualstudio.com/
说明: vscode提供了windows/macos/linux三个平台的相应版本下载
不仅功能强大,而且免费
2,pycharm
官网: PyCharm: the Python IDE for Professional Developers by JetBrainsThe Python & Django IDE with intelligent code completion, on-the-fly error checking, quick-fixes, and much more...https://www.jetbrains.com/pycharm/
说明:pycharm对windows/macos/linux三个平台都提供相应版本的下载
professional 做为专业版需要付费,
Community Edition 可以免费使用
1,访问官网:
JetBrains: Essential tools for software developers and teamsJetBrains is a cutting-edge software vendor specializing in the creation of intelligent development tools, including IntelliJ IDEA – the leading Java IDE, and the Kotlin programming language.https://www.jetbrains.com/
如图:跳转到pycharm的下载页面:
在pycharm页面,点击下载按钮
在下载页面,拉到下面的Community Edition,点击下载
双击打开dmg之后,把Pycharm CE 拖动到Applications文件夹中即可
启动应用,在下面的界面选中复选框,表示接受它给出的用户协议,
并点击continue按钮
进入主界面后,点击 New Project创建一个新项目
说明:刘老师的技术森林是一个专注python/golang的博客,
网址:https://blog.csdn.net/weixin_43881017
原文:
说明:作者:刘宏缔 邮箱: [email protected]
1,指定项目的位置和解释器即可,
Location: 项目位置:选择我们准备好的目录,
Base interpreter 解释器:选择我们新安装的3.12版本
然后点击下方的 create 按钮,如图:
2,页面上其他各项功能的说明
说明:New environment using 虚拟环境我们就使用默认的VirtualEnv,
Location 虚拟环境的位置也使用默认的项目目录下,
这两项无需改动
Inherit global site-packages: 继承全局的第三方软件包,
如果选中则会把全局的软件包复制到项目的虚拟环境中
Make available to all projects: 使所有项目都可用此配置
Previously configured interpreter:之前配置的解释器
因没有必要,所以此三项都保留没做改动
Create a main.py welcome script:创建main.py欢迎脚本,默认选中
项目创建完成后,新建一个python程序:
在项目名称上右键->new->File
给创建的文件命名为hello.py,并写一行代码:
print("hello,world")
然后在文件上右键->Run ‘hello’
运行后看到结果:包括文件路径和程序的输出
菜单->PyCharm->About PyCharm