PyCharm 安装教程(Windows)
PyCharm 是一款功能强大的 Python 编辑器,具有跨平台性,鉴于目前最新版 PyCharm 使用教程较少,为了节约时间,来介绍一下 PyCharm 在 Windows下是如何安装的。
这是 PyCharm 的下载地址:http://www.jetbrains.com/pycharm/download/#section=windows
进入该网站后,我们会看到如下界面:
![](https://jihuo.bianchenghao6.com/uploads/202404/16/09bcf0ee7eabd914.webp)
professional 表示专业版,community 是社区版,推荐安装社区版,因为是免费使用的。
1、当下载好以后,点击安装,记得修改安装路径,我这里放的是E盘,修改好以后,Next
![](https://jihuo.bianchenghao6.com/uploads/202404/16/f7ed8e879d24736f.webp)
2、接下来是
![](https://jihuo.bianchenghao6.com/uploads/202404/16/c6d858e3546394b8.webp)
我们可以根据自己的电脑选择32位还是64位,目前应该基本都是64位系统吧
3、如下
![](https://jihuo.bianchenghao6.com/uploads/202404/16/78cefe13b357b65c.webp)
点击Install,然后就是静静的等待安装了。如果我们之前没有下载有Python解释器的话,在等待安装的时间我们得去下载python解释器,不然pycharm只是一副没有灵魂的驱壳
4、进入python官方网站://www.python.org/
![](https://jihuo.bianchenghao6.com/uploads/202404/16/04923499f3a6b103.webp)
点击Downloads,进入选择下载界面
5、如下所示,选择我们需要的python版本号,点击Download
![](https://jihuo.bianchenghao6.com/uploads/202404/16/d6d289087aeac675.webp)
6、我选择的是python3.5.1,会看到如下界面
![](https://jihuo.bianchenghao6.com/uploads/202404/16/19c1c58960183c0b.webp)
因为我们需要用到的是Windows下的解释器,所以在Operating System中可以选择对应的Windows版本,有64位和32位可以选择,我选择的是画红线的这个,executable表示可执行版,需要安装后使用,embeddable表示嵌入版,就是解压以后就可以使用的版本。
可执行版安装比较简单,一直默认就好了。embeddable需要注意,当我们解压
![](https://jihuo.bianchenghao6.com/uploads/202404/16/bafce49da531ab8b.webp)
这个也是需要解压到同一路径的,这里面放着pip、setuptools等工具,如果不解压,我们将无法在pycharm中更新模块,比如需要用到pymysql,就无法下载。虽然也能用,但是就是"阉割版"的python解释器了。
如果是embeddable版,记得把解释器所在的路径添加到环境变量里,不然pycharm无法自动获得解释器位置。
7、添加环境变量
(1)右键我的电脑,点击属性,弹出如下界面
![](https://jihuo.bianchenghao6.com/uploads/202404/16/e54d5d5d0110af04.webp)
(2)点击高级系统设置,出现下图
![](https://jihuo.bianchenghao6.com/uploads/202404/16/87829d9ef269e9d6.webp)
(3)点击环境变量
![](https://jihuo.bianchenghao6.com/uploads/202404/16/728dd6c926726133.webp)
(4)找到系统变量里面的Path,编辑它,将python解释器所在路径粘贴到最后面,再加个分号。
![](https://jihuo.bianchenghao6.com/uploads/202404/16/988727467bce019a.webp)
环境变量配置结束
8、这时候Pycharm也装好了,我们进入该软件。
![](https://jihuo.bianchenghao6.com/uploads/202404/16/c6ce4bef1fe316dc.webp)
9、点击Create New Project,接下来是重点
![](https://jihuo.bianchenghao6.com/uploads/202404/16/a58a42fb256f37a2.webp)
Location是我们存放工程的路径,点击
![](https://jihuo.bianchenghao6.com/uploads/202404/16/49365176f6025862.webp)
这个三角符号,可以看到pycharm已经自动获取了Python 3.5。
![](https://jihuo.bianchenghao6.com/uploads/202404/16/3098d280c38bb32e.webp)
点击第一个
![](https://jihuo.bianchenghao6.com/uploads/202404/16/0b2ed0aef00f5dc5.webp)
我们可以选择Location的路径,比如
![](https://jihuo.bianchenghao6.com/uploads/202404/16/89c2dfd0ca61b5ef.webp)
记住,我们选择的路径需要为空,不然无法创建,第二个Location不用动它,是自动默认的,其余不用点,然后点击Create。出现如下界面,这是Pycharm在配置环境,静静等待。最后点击close关掉提示就好了。
![](https://jihuo.bianchenghao6.com/uploads/202404/16/eb8670c11fe0398c.webp)
10、建立编译环境
![](https://jihuo.bianchenghao6.com/uploads/202404/16/74014fc4349d275a.webp)
右键
![](https://jihuo.bianchenghao6.com/uploads/202404/16/ec77b726bf2a7316.webp)
点击New,选择Python File
![](https://jihuo.bianchenghao6.com/uploads/202404/16/cdf7fd95799c6f7a.webp)
给file取个名字,点击OK
![](https://jihuo.bianchenghao6.com/uploads/202404/16/9befe2637810fed0.webp)
系统会默认生成hello.py
![](https://jihuo.bianchenghao6.com/uploads/202404/16/6ceed2618efdc678.webp)
好了,至此,我们的初始工作基本完成。
11、我们来编译一下
![](https://jihuo.bianchenghao6.com/uploads/202404/16/abe7a4864beb0949.webp)
快捷键ctrl+shift+F10或者点击
![](https://jihuo.bianchenghao6.com/uploads/202404/16/eca686858df7a384.webp)
绿色三角形,就会编译,编译结果如下
![](https://jihuo.bianchenghao6.com/uploads/202404/16/a938c078bd9fa14e.webp)
12、对了,因为我之前已经添加过了,所以可以直接编译,还有很重要的一步没说,不然pycharm无法找到解释器,将无法编译。
点击File,选择settings,点击
![](https://jihuo.bianchenghao6.com/uploads/202404/16/40e9d03bb5da3b4a.webp)
添加解释器
![](https://jihuo.bianchenghao6.com/uploads/202404/16/6f94afa772461db7.webp)
最后点击Apply。等待系统配置。
如果我们需要添加新的模块,点击绿色+号
![](https://jihuo.bianchenghao6.com/uploads/202404/16/b2ef86e6b1092092.webp)
然后直接搜索pymysql
![](https://jihuo.bianchenghao6.com/uploads/202404/16/5852fd15266c7506.webp)
然后点安装
![](https://jihuo.bianchenghao6.com/uploads/202404/16/6718940ef4df23bd.webp)
以上就是pycharm的安装过程以及初始化,还有Python解释器的安装配置。
原文链接:https://blog.csdn.net/c_shell_python/article/details/