我只介绍windows的安装过程,因为mac的安装过程实在是过于简单了,一路继续就可以了。
下载地址为
https://www.jetbrains.com/pycharm/download/#section=windows
根据自己的操作系统进行下载,左侧是Professional,收费专业版本,右侧是Community,免费社区版本。
你可以选择社区版本,功能基本够用,如果想用专业版本,就需要注册码,好在网络上很多人分享注册码,因此,专业版本也可以正常使用,只是需要经常更换注册码,本教程在后面会提供注册码。
如果你嫌麻烦,可以和我使用一样的安装包
网盘地址为: https://pan.baidu.com/s/1kOAWrynFlU5EqZ_EwOTzvw
点击next
修改安装目录,不要安装在c盘就行,修改好以后点击next
除了Add launchers dir to the PATH ,其他都勾选,点击next
点击Install
安装过程大约3分钟,耐心等待
首次启动,需要对编辑器进行配置,注册激活,新建项目,设置项目的解释器,过程十分麻烦,本教程以windows为例,mac用户可以用作参考
在桌面上找到图标
双击启动
勾选Do not import settings,首次启动,没有历史配置可以导入
勾选 I confirm, 点击Continue按钮
点击Don't send按钮
点击左下角的skip 按钮
填写注册码
QYYBAC9D3J-eyJsaWNlbnNlSWQiOiJRWVlCQUM5RDNKIiwibGljZW5zZWVOYW1lIjoi6LaF57qnIOeoi+W6j+WRmCIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiIiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwiZmFsbGJhY2tEYXRlIjoiMjAyMC0wMS0wNCIsInBhaWRVcFRvIjoiMjAyMS0wMS0wMyJ9LHsiY29kZSI6IkFDIiwiZmFsbGJhY2tEYXRlIjoiMjAyMC0wMS0wNCIsInBhaWRVcFRvIjoiMjAyMS0wMS0wMyJ9LHsiY29kZSI6IkRQTiIsImZhbGxiYWNrRGF0ZSI6IjIwMjAtMDEtMDQiLCJwYWlkVXBUbyI6IjIwMjEtMDEtMDMifSx7ImNvZGUiOiJQUyIsImZhbGxiYWNrRGF0ZSI6IjIw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qgR8gyG8oiNDyNEoAbsR3lOpI7grUYSvkB/xVy/VoklPCK2h0f0GJxFjnye8NT1PAywoyl7RmiAVRE/EKwIDAQABo4GZMIGWMAkGA1UdEwQCMAAwHQYDVR0OBBYEFGEpG9oZGcfLMGNBkY7SgHiMGgTcMEgGA1UdIwRBMD+AFKOetkhnQhI2Qb1t4Lm0oFKLl/GzoRykGjAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBggkA0myxg7KDeeEwEwYDVR0lBAwwCgYIKwYBBQUHAwEwCwYDVR0PBAQDAgWgMA0GCSqGSIb3DQEBCwUAA4ICAQAF8uc+YJOHHwOFcPzmbjcxNDuGoOUIP+2h1R75Lecswb7ru2LWWSUMtXVKQzChLNPn/72W0k+oI056tgiwuG7M49LXp4zQVlQnFmWU1wwGvVhq5R63Rpjx1zjGUhcXgayu7+9zMUW596Lbomsg8qVve6euqsrFicYkIIuUu4zYPndJwfe0YkS5nY72SHnNdbPhEnN8wcB2Kz+OIG0lih3yz5EqFhld03bGp222ZQCIghCTVL6QBNadGsiN/lWLl4JdR3lJkZzlpFdiHijoVRdWeSWqM4y0t23c92HXKrgppoSV18XMxrWVdoSM3nuMHwxGhFyde05OdDtLpCv+jlWf5REAHHA201pAU6bJSZINyHDUTB+Beo28rRXSwSh3OUIvYwKNVeoBY+KwOJ7WnuTCUq1meE6GkKc4D/cXmgpOyW/1SmBz3XjVIi/zprZ0zf3qH5mkphtg6ksjKgKjmx1cXfZAAX6wcDBNaCL+Ortep1Dh8xDUbqbBVNBL4jbiL3i3xsfNiyJgaZ5sX7i8tmStEpLbPwvHcByuf59qJhV/bZOl8KqJBETCDJcY6O2aqhTUy+9x93ThKs1GKrRPePrWPluud7ttlgtRveit/pcBrnQcXOl1rHq7ByB8CFAxNotRUYL9IF5n3wJOgkPojMy6jetQA5Ogc8Sm7RG6vg1yow==
注册码有效期至21年1月3日,点击按钮,至此,完成了初步配置与注册激活
点击create new project
左侧选择 pure python, 右侧Location设置项目的目录,你根据自己电脑的情况进行设置,最后点击create按钮
去掉show tips on startup ,点击close按钮,此时页面如下
右键点击项目hello,选择New,选择Python File
输入脚本名称hello,点击回车
在新建脚本里写入代码
print('hello world')
右键点击编辑区的任意位置,选择Run 'hello', 编辑器里会显示执行结果
注意看黄色区域,hello项目使用的python解释器是虚拟环境下的,在使用上不会有任何问题,唯一的问题是,如果你在项目里使用第三方模块,那么你就需要通过pycharm进行安装,而且这个第三方模块只能用于这个项目,想要让第三方模块适用于所有项目,需要配置项目的解释器为你所安装的python解释器,而非虚拟环境下的python解释器
我的python安装在D:\Python36 目录下,现在,我要讲hello项目的解释器修改为这里的解释器
点击左上角的File菜单,选择Settings
找到左侧的hello项目,选择 project interpreter,可以看到右侧黄色框内的解释器是虚拟环境venv下的解释器
点击右侧的向下的小箭头,选择Show All
点击右侧的加号
勾选Existing environment,然后点击右侧红色框内的按钮
找到自己所安装的python解释器,点击ok按钮
勾选 make available to all projiects,点击ok按钮
选中自己安装的python解释器,点击ok
再次执行程序,可以发现,python解释器已经发生改变。
QQ交流群: 211426309