Python2.7 install the Windows version of the interpreter

surroundings

1
win7  +  Python2. 7.15

No.1 Download

1.1 Open Python official website of the Windows platform Download Link

Selecting a corresponding executable file selected to be downloaded 1.2 interpreter version, the system in accordance with the number of bits (system type [32], or with a control panel [64] - - [System])

No.2 Install

2.1 Double-click the exe file

2.2 Select Install for all users, and click [Next]

Here choose a custom installation, and not added to the PATH, behind our own configuration

2.3 Select the installation directory, click [Next]

2.4 Options, click [Next]

1
在下面的树状功能中,我们什么都不动。PATH稍后我们手动添加

2.5 Installation

[User Account Control appears you want to allow it to make changes to this computer program do? ] Choose [Yes]

Wait for the installation to complete

2.6 installation is complete, click [Close]

Thanks to Mark Hammond contribution to the installation window mode provides. thanks man!

ps: Python comes with no access to windows system API library, you need to download when using. Name of the library called pywin32 , and the author is Mark Hammond pywin32

No.3 configuration environment variable

In order to consider the future, let's lay the foundation for coexistence of multiple versions

3.1 Open the installation directory [C: \ Python27], [will] python.exe file copy, rename] [python27.exe

 

3.2 Open Scrpts directory under the installation directory [C: \ Python27 \ Scripts], the [same] pip.exe copy, rename] [pip27.exe

 

The above two steps in order to lay the foundation for future coexistence of multiple versions.

3.3 Adding Environment Variables

获取到安装目录路径和其内的Scripts目录,然后做成这样的【C:\Python27;C:\Python27\Scripts;】路径。然后打开【计算机】右键【属性】--【高级系统设置】--【环境变量】--【系统变量】下拉找到【Path】并选中它,点击【编辑】,将刚才做好的路径【C:\Python27;C:\Python27\Scripts;】添加到末尾,注意,该路径必须与之前的路径之间用英文状态的分号隔开(有则忽略)。点击【确定】-- 【确定】--【确定】。OK了

No.4 Tests

在任意位置新打开cmd窗口(不要在已打开的cmd窗口测试),按照如下输入。如果提示【'python' 不是内部或外部命令,也不是可运行的程序或批处理文件。】那么,稍事等待或者重启电脑测试。

至此,Python2.7.15版本的解释器和pip安装配置完毕。并且可以和其他的Python版本共存。只要按照我这种方式以版本号命名的方式。

注意:由于我把之前的python3.7版本的解释器当作默认解释器,2.7版本就只能用版本号的方式来调用了,你的电脑如果想把2.7的解释器当作默认的,就在添加环境变量的时候,把2.7的解释器路径整体放到3.7路径之前。就可以了。如果你都没有别的版本的解释器,那么这里就是默认的了。


 

Guess you like

Origin www.cnblogs.com/sundawei7/p/11962233.html