Setting up Python in Windows 8.1

Note: Also see my guide to Python setup for Windows 10!

One of my family members recently acquired a Windows 8.1 laptop, and I was curious as to whether Python setup was as easy as when I wrote about installing it on Windows 7. Turns out, it is — and not much different. Which could spawn a whole conversation about Windows OS development, but that’s for another day …

Here’s your quick guide, modified from my earlier Win 7 post:

Set up Python on Windows 8.1

  1. Visit the official Python download page and grab the Windows installer. Choose the 32-bit version. A 64-bit version is available, but there are compatibility issues with some modules you may want to install later.

Note: Python currently exists in two versions, the older 2.x series and newer 3.x series (for a discussion of the differences, see this). This tutorial focuses on the 2.x series.

  1. Run the installer and accept all the default settings, including the “C:\Python27” directory it creates.

3. Next, set the system’s PATH variable to include directories that include Python components and packages we’ll add later. To do this:

  • Open the Control Panel (you can find it using Search on the Charms Bar).
  • In the Control Panel, search for and open System.
  • In the dialog box, select Advanced System Settings.
  • In the next dialog, select Environment Variables.
  • In the User Variables section, edit the PATH statement to include this (if there is no PATH variable, click NEW to create one):
  1. Now, you can open a command prompt (Charms Bar | Search | cmd) and type:
C:\> python

That will load the Python interpreter:

Python 2.7.6  (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or license for more information.

Because of the settings you included in your PATH variable, you can now run this interpreter — and, more important, a script — from any directory on your system.

Press Control-Z plus Return to exit the interpreter and get back to a C: prompt.

Set up useful Python packages

  1. setuptools offers the helpful easy_install utility for installing Python packages. Grab the appropriate version for your system and install (easiest way is the script). 
  2. pip is another package installer that improves on setuptools. Having pip and setuptools will cover most of your installation needs, so go ahead and add pip. Now that you’ve installed setuptools, you can add pip by typing the following at any Windows command prompt (not in the Python interpreter): 
C:\> easy_install pip

Notice that easy_install executes without needing to be told where on the system it’s located. That’s the benefit of adjusting your PATH variable earlier.

  1. Mechanize, Requests and BeautifulSoup are must-have utilities for web scraping, and we’ll add those next:
C:\> pip install mechanize
C:\> pip install requests
C:\> pip install beautifulsoup4
  1. csvkit, which I recently covered here, is a great tool for dealing with comma-delimited text files. Add it:
C:\> pip install csvkit

You’re now set to get started using and learning Python under Windows 8.1. If you’re looking for a handy guide, start with the Official Python tutorial.

49 responses to “Setting up Python in Windows 8.1”

  1. MaxHeadroom says:

    Hi thanks for the great guides!
    I’m experiencing some problems with Windows 8.1 and CSVkit. I’m sorry to ask you but I cant find any info on this particular problem anywhere on the net.

    Downloading/unpacking argparse>=1.2.1 (from csvkit)
      Could not find a version that satisfies the requirement argparse>=1.2.1 (from
    csvkit) (from versions: 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0,
    0.9.0, 0.9.1, 1.0.1, 1.0, 1.1)
      Some externally hosted files were ignored (use --allow-external to allow).
    Cleaning up...
    No distributions matching the version for argparse>=1.2.1 (from csvkit)

    Yet, when I try to reinstall argparse it says that I have the latest version of argparse.

    Do you have any idea of what is wrong or could you perhaps point me in the right direction of where I might find an answer?

  2. Anthony says:


    Hmm. Looks like an issue with pip and that particular package. Quick Google search turned up this:

    Since you have argparse installed, have you tried using csvkit?

  3. Ojas says:
    pip install --allow-all-external csvkit

    has resolved the issue

  4. Jaminyah says:

    There is no C:\Python27\Scripts\; folder associated with Python 2.7 installation. There is however C:\Python27\Tools\Scripts\;

    Can you comment on this issue?

  5. Anthony says:

    If you run through all the steps in this tutorial, you’ll have a C:\Python27\Scripts folder.

  6. Aman says:

    i installed python and after that i open light table i get

    Failed to save: default.clj

    Error: EPERM, operation not permitted ‘C:\Users\Amanpreet\AppData\Local\LightTable\ltcache\default.clj’

    please help, am new to this so explain in lehman terms

  7. Dinesh Murani says:

    Really nice Anthony. Sharing is caring. Keep sharing as much as possible.

    Thank you.

  8. Ian says:

    Anthony – as stated by Jaminyah when 2.7.6 is installed as per your article there is no C:\Python27\Scripts\ directory created. Is it Ok to just create this directory or should I modify the path to point to C:\Python27\Tools\Scripts\ ? I had previously installed 3.4 which did have a C:\Python34\Scripts\ directory but I just couldn’t get it to work so uninstalled and installed 2.7.6 which activated when I ran cmd then C:> python

    Now I’m not sure where to put my gimpshop python scripts as they don’t seem to be being found in the gimpshop\lib\gimp\2.0\plug-ins directory, despite that also being in the user path…

  9. Anthony says:


    Not sure why you’re not getting a C:\Python27\Scripts\ directory, as it’s always added whenever I do an install on Win 7 or Win 8. You can go ahead and add it manually.

    Many other install docs reference that directory as well. For example:

  10. Mike says:

    Looks like I had to reboot Windows 8.1 after changing the path. Lame.

  11. Anthony says:


    Usually just closing and re-opening the command prompt does the trick.

  12. Ismail says:

    Hello Anthony,

    Being a newbie in Python, I installed it following the above instructions, yet I am facing the same ambiguity as Jaminyah: I don’t have a Scripts folder in Python27, but I don’t find it in the Tools folder. Should I add C:/Python27/Tools/Scripts or is something wrong with my installation ?


  13. Ismail says:

    Never mind, it works now. Thanks

  14. Joey says:

    Great instructions, Anthony. Python installed from scratch with all the things in under an hour on Windows 8.1.

  15. Anthony says:

    Glad it helped, Joey!

  16. Abhishek says:

    Fantastic tut Anthony !! That covered everything one needed to install python 😉

  17. Anirudhha says:

    my showing import error :no module named ‘cryto ‘ after all the steps above given by you .v

  18. Nevin says:

    Thanks for the help! It’d been awhile since I’d set up a system, especially a PC!

  19. Ale says:

    Hi thanks for the great guides!

    I have this:

      Running install for sqlalchemy
        building 'sqlalchemy.cprocessors' extension
        Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from
        WARNING: The C extension could not be compiled, speedups are not enabled.
        Failure information, if any, is above.
        Retrying the build without the C extension now.
        warning: no files found matching '*.jpg' under directory 'doc'
        warning: no files found matching 'Makefile' under directory 'doc'
        warning: no files found matching ''
        warning: no files found matching ''
        warning: no files found matching ''
        no previously-included directories found matching 'doc\build\output'
        WARNING: The C extension could not be compiled, speedups are not enabled.
        Plain-Python build succeeded.

    what should I do?


  20. Anthony says:


    Here are a couple possible fixes for the “unable to find vcvarsall.bat” problem:

    1) The easiest thing to do is download precompiled Windows binaries here:

    2) Other options:

  21. Manbir says:

    Thanks Anthony. I almost gave up python because I could not install Beautiful soup. I am glad to find this great article. It helped me in getting started.
    Thank you

  22. Benny says:

    I didn’t read the other comments so I don’t know if someone already mentioned that. You can activate the Option to automatically put Python to the system PATH variable on the very bottom of the list of things to install, so you don’t have to put this manually after installing. Worked fine for me. If there’s no one complaining to have problems after that you may add that to the Tutorial 😉

  23. Damian says:

    Thank you, Antony! Helped alot. Could you please tell the best way to install Django under Windows 8?

  24. Anthony says:


    Running this will install Django:

    pip install django

    For local development, you can use Django’s built-in development server. Check their tutorials.

  25. Devin Cutler says:

    Dear Anthony:

    I am not a huge techie.

    My 13 year old son just got a Windows 8.1 laptop and had been happily learning python on his old Windows 7 laptop. He wanted to continue to program and run his game scripts on his new machine. I followed the above advice, specifically installing 32 bit Python 2.7.9 and setting the PATH variable as you indicated.

    When I go to the command line and type “python” I get the Python interpreter. All good and well so far.

    But then I try to run his script from the command line and nothing happens. It just returns the command prompt again.

    His scripts are in the C:\Python27\Scripts folder.

    I have tried running them by typing the script name plus the .py extension (which just returns the command prompt)or by typing “python” (which results in a “can’t open file [Errno2}” message) but nothing works. And I have tried these from both the command line:




    Nothing works. Am I doing something wrong?

    Can you offer any advice to this newbie?



  26. Newton says:

    Thank you for the hand-holding. While I am sad to know that I needed it, I did need it to get through so I am grateful your tutorial was here. Followed the step-by-step and finally got everything in correctly. The only thing in the whole tutorial that caused any confusion for me, was that there is a SYSTEM PATH variable already, in my computer, but not a USER one, so I was concerned that I was adding to the wrong PATH, though it seems that the installs have gone beautifully so I worried for nothing.

    Thank you!

  27. […] I didn’t think about using W8.1 being an issue, though it has been. Thankfully, Anthony DeBarros’s super helpful tutorial broke it down a lot for me. Had I just searched for 8.1 specific set up […]

  28. Anthony says:


    First, I would suggest moving your son’s scripts to their own folder, perhaps c:\PythonScripts. Keep them separate from system Python things.

    Then cd into that folder and run:


    (Replace with the name of his script.)

  29. anukriti says:

    Thanks alot! It was really helpful.
    I tried to install Twisted by using: pip install twisted. It got successfully installed, but gave some warnings.

    C:\>pip install twisted
    Downloading/unpacking twisted
    Downloading/unpacking zope.interface>=3.6.0 (from twisted)
      Running (path:c:\users\anukriti\appdata\local\temp\pip_build_anukriti
    \zope.interface\ egg_info for package zope.interface
        warning: no previously-included files matching '*.dll' found anywhere in dis
        warning: no previously-included files matching '*.pyc' found anywhere in dis
        warning: no previously-included files matching '*.pyo' found anywhere in dis
        warning: no previously-included files matching '*.so' found anywhere in dist
    Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\pytho
    n27\lib\site-packages (from zope.interface>=3.6.0->twisted)
    Installing collected packages: twisted, zope.interface
      Running install for zope.interface
        warning: no previously-included files matching '*.dll' found anywhere in dis
        warning: no previously-included files matching '*.pyc' found anywhere in dis
        warning: no previously-included files matching '*.pyo' found anywhere in dis
        warning: no previously-included files matching '*.so' found anywhere in dist
        building 'zope.interface._zope_interface_coptimizations' extension
                An optional code optimization (C extension) could not be compiled.
                Optimizations for this package will not be available!
        Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it
        Skipping installation of C:\Python27\Lib\site-packages\zope\ (nam
    espace package)
        Installing C:\Python27\Lib\site-packages\
    Successfully installed twisted zope.interface
    Cleaning up... 

    what about these warnings?

  30. Anthony says:


    Not 100% sure but I believe it’s looking for a compiler and not finding one. As you say, though, it probably installed just fine. Other experts who hang around here might know better.

    Most Python packages install OK with pip on Windows, but any time I think I’m in trouble I look for a Windows binary and install that using pip. You can find a bunch at this incredibly helpful page:

  31. Very helpful article! Thanks 🙂

  32. Issam says:

    Hello Antony,
    i am new for python,i am using a laptop with windows 8.1,i followed the instructions upwards,i installed python2.7 i changed the path but its still showing the old path when opening the command prompt,and when trying to run the file from the google exercises its giving “Access is denied” and after loading the Python interpreter i run the same file its giving a syntax error.finally when i press Control-Z its not exiting to the interpreter and get back to a C: prompt,its happening when i press ctrl-x.Thamks in advanced

  33. Anthony says:


    The PATH you enter above is different than the path of your command prompt. If you can type python at the command line and get the interpreter, then you’re up and running.

  34. ruedaCid says:

    Great tutorial, thanks

  35. AC says:

    Quite useful and easy to follow. Thanks Anthony!

  36. snotnozdbrat says:

    thank you so much for the step by step! very helpful 🙂

  37. Anthony says:

    Glad you all find this useful!

  38. Larry Wolfson says:

    Just starting in python on my own. Was totally confused about setuptools, pip, requests, etc until I found your site. Most “help” out there is only intelligible if you already know what they are trying to tell. Yours is one of the few that explains concisely and thoroughly what the lost (me) needs to know. It guided me through exactly what I needed to know and how to do it. In no time I had all the components I need.
    Thank you. Thank you. Thank you.

  39. Muthu says:

    Thanks for the handy tutorial. I was able to setup Python just in 30 mins.

  40. Dun Pal says:

    I am trying to follow Google Python class, my Python 2.7 installation seems to work but I cannot run any of their exercises (e.g script

  41. vmurahari says:

    Thanks a ton, i got python up & running in less than 10 minutes. Thanks for sharing.

  42. I am Thankful for you says:

    Thank you very much. You helped me to solve a problem which has already consumed tens of hours to solve. Thanks a lot . Keep the good work

  43. Bhushan Purushe says:

    Sir Anthony,
    Thank you very much. I am just started with Python development. This tutorial helps me to python installation.

  44. Debolina says:

    Hello Sir
    Can you please help me fix the problem which I’m getting while installing Python on my Windows 8.1
    It shows the following:
    Setup failed
    One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the log file. 0x80240017- Unspecified error

    If you help me fix this issue , it would be very thankful of you.

  45. Anthony says:

    Hi, Debolina,

    Unfortunately, there isn’t enough information in your comment for me to help diagnose the issue. Perhaps another reader will be able to help.

  46. […] Instala Python 2.7 si es que aún no lo tienes, y asegúrate de añadir su la dirección de instalación a tu PATH. […]

  47. sumo walubah says:

    your advice was great but i am coding in python 3xx not 2.7 which is obsolate thanks nay way im going continues reseaching until i find solutions.

  48. Eltegani says:

    nice version

  49. Timothy Lewis says:

    You Sir are a life saver. Been pulling my hair out trying to open a plug-in I bought and until I found you I was dead in my tracks. Followed your instructions and got the job done. Thanks again.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.