在Windows 8上安装Python 2.7 [英] Installing Python 2.7 on Windows 8

查看:84
本文介绍了在Windows 8上安装Python 2.7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我正在Windows上尝试python 2.7.它正在运行Windows8.我无法将其添加到我的路径中.我照常做:使用高级系统设置,环境变量,并在系统变量中添加C:\Python27.

So I'm trying python 2.7 on my Windows. It is running Windows 8. I cannot add it to my path. I've done the usual: using the advanced system settings, environment variables, adding C:\Python27 in system variables.

但是,当我在命令提示符下键入Python时,它说无法识别python .."

However, when I type Python in command prompt it says 'python is not recognized ..'

推荐答案

我认为这个问题的实质是如何安装Python并能够从命令行使用它.下面的步骤显示了如何使所有工作正常进行.检查您是否没有错过任何东西:

I think that the essence of this question is how to install Python and be able to use it from the command line. The steps below show how to get all that working. Check that you didn't miss anything:

  1. https://www.python.org/download/releases/2.7.6 下载适当的Python 2.7.6 Windows Installer. (如果该链接不起作用,请检查 https://www.python.org/downloads/)
  2. 运行文件
  3. 选择为所有用户安装"或仅为我安装",单击下一步"
  4. 您会看到它安装在C:\ Python27文件夹下,单击Next
  5. 再次单击下一步"以执行自定义Python"步骤
  6. 单击完成
  7. 打开控制面板,然后打开系统
  8. 点击左侧的高级系统设置"
  9. 点击环境变量"按钮
  10. 在系统变量"下,单击名为路径"的变量,然后单击编辑..."按钮. (这将为所有用户设置它,您可以选择编辑User变量,仅将python设置为当前用户的命令提示符命令)
  11. 在不删除任何其他文本的情况下,在变量值"的开头添加C:\Python27;(包括分号),然后单击确定".
  12. 在环境变量"窗口中单击确定".
  1. From https://www.python.org/download/releases/2.7.6 download appropriate Python 2.7.6 Windows Installer. (If that link doesn't work, check https://www.python.org/downloads/)
  2. Run the file
  3. Select install for all users or install just for me, click Next
  4. You'll see it installs under the C:\Python27 folder, click Next
  5. Click Next again for the 'Customize Python' step
  6. Click Finish
  7. Open Control Panel, then System
  8. Click 'Advanced system settings' on the left
  9. Click the 'Environment Variables' button
  10. Under 'System variables' click the variable called 'Path' then the 'Edit...' button. (This will set it for all users, you could instead choose to edit the User variables to just set python as a command prompt command for the current user)
  11. Without deleting any other text, add C:\Python27; (include the semi-colon) to the beginning of the 'Variable value' and click OK.
  12. Click OK on the 'Environment Variables' window.

打开一个新的命令提示符窗口,键入python,您将在命令提示符下运行python.注意:在设置环境变量之前打开的命令提示符窗口将没有可用的python命令.

Open a new command prompt window type python, you will have python running in the command prompt. Note: command prompt windows open prior to setting the Environment Variable will not have the python command available.

这篇关于在Windows 8上安装Python 2.7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆