本篇作为学习Python笔记,来记录学习过程。

安装环境:windows10

官方下载地址:https://www.python.org/

python embed python embed amd怎么安装_环境变量

有很多的版本 我这里选择了3.7.2

executable表示可执行版,需要安装后使用,embeddable表示嵌入版,就是解压以后就可以使用的版本。

可执行版安装比较简单,一直默认就好了。embeddable需要注意,当我们解压这个也是需要解压到同一路径的,这里面放着pip、setuptools等工具,如果不解压,我们将无法在pycharm中更新模块,比如需要用到pymysql,就无法下载。虽然也能用,但是就是"阉割版"的python解释器了。如果是embeddable版,记得把解释器所在的路径添加到环境变量里,不然pycharm无法自动获得解释器位置。

 

python embed python embed amd怎么安装_环境变量_02

 下载好以后双击安装

python embed python embed amd怎么安装_python_03

(1)勾选Add Python 3.7 to PATH是把Python的安装路径添加到系统环境变量的Path变量中(不用自己添加)
(2)选择Install Now默认将pythone安装在C盘目录下
(3)选择Customize installation可自定义路径

选择Install Now 直接默认下一步就可以,我这里选择Customize installation

python embed python embed amd怎么安装_Python_04

默认全选

python embed python embed amd怎么安装_Python_05

勾选上Install for all users,路径根据自己的需要选择,然后点Install

python embed python embed amd怎么安装_环境变量_06

安装完以后 cmd,输入python 出现如下表示安装好了。

python embed python embed amd怎么安装_python embed_07

测试一下pip 

python embed python embed amd怎么安装_python_08

OK了,可以使用了。

可能存在的问题:

一、如果环境变量没有安装成功

右键点击"计算机",然后点击"属性"

然后点击"高级系统设置"

选择"系统变量"窗口下面的"Path",双击即可!

然后在"Path"行,添加python安装路径即可(我的D:\Python32),所以在后面,添加该路径即可。 ps:记住,路径直接用分号";"隔开!

最后设置成功以后,在cmd命令行,输入命令"python",就可以有相关显示。

二、pip安装失败

Python 2.7.9 + 或 Python 3.4+ 以上版本都自带 pip 工具

pip --version

如果你还未安装,则可以使用以下方法来安装:

https://pypi.org/project/pip/

下载压缩包

python embed python embed amd怎么安装_Python_09

 下载以后解压,cmd定位到解压以后的文件夹执行命令

  python setup.py install进行安装就可以了。

python embed python embed amd怎么安装_Python_10