Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
490 views
in Technique[技术] by (71.8m points)

path - Installing Python 2.7 on Windows 8

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.

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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. 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.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...