Setting up your Windows 10 System for Python Development (PyDev, Eclipse, Python)

In this article I’ll explain how you can set-up your Windows 10 machine for some extreme Python development.

UPDATE: Here is a video version of the tutorial (updated to use the latest Python3 and Eclipse Neon).

Click here to download an easy-to-follow PDF version of this post

Install Python

First we install Python. I recommend Python 2.7 because it has the most compatible packages. Visit www.python.org and navigate to Downloads > Windows and click Python 2.7.9.

Python Website Screenshot

Next, select Download Python 2.7.9 from options.

Download Python Page Screenshot

Wait for the Python installer to download, and then double click on it.

Downloaded Python Installer Screenshot

The Python Windows Installer will launch.

Python Installing Screenshot

In the Python Setup screen, select Install for all users and click Next >.

Python Installer Target Users Screenshot

I recommend you leave the destination directory as default and click Next >.

Python Installer Location Screenshot

Leave the Customize Python 2.7.9 screen as default and select Next >.

Python Installer Customize Screenshot

Wait for the installation to complete.

Python Installer Installing Screenshot

Once the installation completes, choose Finish.

Python Setup Finished Screenshot

Now we need to add Python to the environment variables. This means when you type “python” into the Windows Command Prompt window, it will start Python. Right click the Start Menu in the bottom left and select System to load the System menu.

Windows 10 System Options Screenshot

In the System menu, click on Advanced system settings.

Windows 10 System Screenshot

In the System Properties window, select the Advanced tab and click Environment Variables…

Windows 10 System Properties Screenshot

Under System variables, find the variable with the name Path. Click it and choose Edit…

Windows 10 Environment Variables Screenshot

Being careful to leave the existing values intact, navigate to the end of the Variable value text box. Then append “;C:\Python27\” to the end (without quotes). The semicolon is used to separate the variables. Then click OK to save the update.

Windows 10 Add System Variable Screenshot

Then click OK on the Environment Variables screen.

Windows 10 Environment Variables Screenshot

Click OK on the System Properties screen.

Windows 10 System Properties Screenshot

Exit the System menu by clicking X.

Windows 10 System Screenshot

Now left click the start menu again and choose Command Prompt to load a new Command Prompt window.

Windows 10 Command Prompt Option Screenshot

Now enter “python” into the window and hit Enter.

Windows 10 Command Prompt Screenshot

If you type print “hello world” it should output “Hello World” on the screen. Python has been successfully installed.

Windows 10 Command Prompt Python Screenshot

Install the Eclipse PyDev Plugin

Next we will install the Eclipse PyDev plugin. Launch Eclipse by double clicking on the eclipse executable.

Windows 10 Eclipse Location Screenshot

Eclipse will launch.

Windows 10 Eclipse Loading

Once Eclipse loads, select Help > Install New Software…

Eclipse Install New Software Screenshot

The Install menu will load. Next to the text box that says type or select a site, click on Add…  to add a new repository.

Eclipse Add Repository Screenshot

In the Add Repository window, type the name PyDev, and enter the location as http://pydev.org/updates. Then click OK.

Eclipse Add PyDev Repository Screenshot

Now ensure that the PyDev repository is selected in the Work with menu. Check the box next to PyDev in the list and click Next >.

Eclipse Choose What To Install Screenshot

Review the Install Details screen and select Next >.

Eclipse Luna Install Software Screenshot

Have a fleet of lawyers review the license agreement and if they advise it’s safe, select I accept the license agreement. Then click Finish.

Eclipse Install Software License Agreement Screenshot

The Installing Software box will display the progress of the installation.

Eclipse Installing PyDev Plugin Screenshot

During the installation, you should be prompted if you trust the certificate. Check the box next to Branwy Software; PyDev; Brainwy and click OK.

Eclipse Accept Certificate PyDev Screenshot

After the installation completes you will be prompted to restart eclipse. Choose Yes.

Restart Eclipse Screenshot

Once Eclipse restarts, click on Window > Open Perspective > Other.

Eclipse Create Project Other Screenshot

In the Open Perspective menu you should be able to find one called PyDev. Select it and click OK to open the PyDev perspective.

Eclipse Open Perspective Screenshot

If the Welcome screen is still visible, you can close it by clicking the X.

Eclipse Close Welcome Screen screenshot

PyDev is now installed and you can begin coding!

Eclipse PyDev Perspective Screenshot

If you want to download a PDF version of this guide for your records (which I always suggest as best practice), click on the link below. 

Cheers,
Mark

Click here to download an easy-to-follow PDF version of this post

66 replies
  1. Siew Kam Onn
    Siew Kam Onn says:

    Did you install PyWin32 by any chance ?
    I have read of several incidents where PyWin32 would not install or import win32api fails.

    Reply
  2. T Youssouf
    T Youssouf says:

    I installed python 3.4.3 for win 10 following the steps. When i type print “hello world” it prints <>. saying syntax error: missing parenthesis in call to ‘print’
    >>>

    Reply
    • mark
      mark says:

      Hey, are you copying and pasting it from the page? It might be because sometimes the browser renders the quotes as a different character. It sounds really weird but there are a number of different types of quote. Try deleting the whole line and writing it again using single quotes instead of double quotes. Let us know if it works for you.

      Reply
  3. Kevin Fairchild
    Kevin Fairchild says:

    You can skip all of those extra steps for adding Python to your environmental path by just enabling the option during install (the last option, which is X’d out in your screenshot).

    Reply
  4. Kevin Fairchild
    Kevin Fairchild says:

    Can’t you skip all of those extra steps for adding Python to your environmental path, just by turning on that option during install (the last option, which is X’d out in your screenshot)?

    Reply
    • mark
      mark says:

      Hi Keven, thanks for the comment. Yes, absolutely you can. The reason I include it is because if someone is new to Python and forgets to check this, it can be a nightmare to figure out how to solve it. I’m hoping that with my tutorial detailing the steps including Python Path, it will give people a deeper understanding of what’s happening and prevent them from spending hours trying to figure out what’s going on 🙂

      Reply
      • Lobna
        Lobna says:

        thank you very much that you wrote it step by step because i wasnt able to figure out why its not working on my laptop
        i watched alot of videos and it wasnt working but when i came here and i did exactly what you did it worked and i was so happy thank you again ! 🙂

        Reply
  5. Anonymous
    Anonymous says:

    Hi,
    In the command prompt when I type ‘python’ (quotes removed of course)
    this message pops up:

    ‘python’ is not recognized as an internal or external command,
    operable program or batch file.

    is there any way to fix this?

    Thank you in advance

    Reply
  6. eli napchan
    eli napchan says:

    Would it not be better to install a 64 bit version of python in windows 10?

    For data plotting and using emacs in org-mode, which version of python: 3.4.3 or 2.7 (assuming that the required libraries are available in both).

    Reply
  7. zen python
    zen python says:

    This would have been a great article if only the author would realize that it is time to drop python 2 and offer full support of python3 — Get over it folks python 2 is dead.

    Reply
    • mark
      mark says:

      Thanks for taking the time to comment. I totally agree with you! I wrote it using Python 2 because it’s what I was using at the time, as I was working on a big project that had some dependencies which were not ported to Python 3. On my new projects I use Python 3 and I plan to make a Python 3 version of this article soon!

      Reply
    • sbroscious
      sbroscious says:

      Python 2 is dead when Python 3 is used more and has more supported libraries. That is not the case, even 8 months after you wrote this. Do some Python 3 development if you want it adopted. Currently there is just too much “legacy” code written in Python 2 for many people, seriously using Python, to switch to Python 3.

      Reply
  8. Yiming
    Yiming says:

    hello,
    I am totally new to python and install it for the first time. I am not tech savvy at all. Following your instructions, I have a problem at the step, where I have to append“;C:\Python27\” to the end of variable box. In the system variable box, my variable is looking very different from yours. It says ” Files (x86)\Skype\Phone\;%USERPROFILE%\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\” Instead of “system32\wbem\systemroot%……” Why this might be? Do I need to add an extra line for this?

    Could you also explain why “Python27”, if I am install python 3.4.4, do I still append “\Python27”?
    Thank you very much!

    Reply
    • Lina
      Lina says:

      hello Yiming, I’ve just installed Python (2.7.12 thou) and am having the same issue adding the Path to it. My variable looks very similar to yours. Did you manage to sort it?
      Thank you!

      Reply
  9. Gerard
    Gerard says:

    Hi Mark,

    I am a newbee and I would like to have some additional help.
    After I installed Python 2.7.11, all of a sudden you introduce PyDev for Eclipse. Now first of all, I can find ‘Eclipse’ (eclipse-inst-win64.exe) on the internet, but do not know which one to install (varying from ‘Eclipse IDE for JAVA Developers’ to ‘Eclipse for Scout Developers’??). Maybe after that it will become cleare, but still haven’t got a clou how to integrate/install this from your explanation.

    Please, a little bit moer info on this,
    Regards Gerard

    Reply
    • mark
      mark says:

      Hi Gerard,

      Thanks for the comment. I agree, Eclipse is a bit confusing to get going. I typically use the “Eclipse IDE for Java EE Developers” version because I feel it is the most complete with existing plugins. However, technically it should not matter which version you choose to use, as installing PyDev should work on any. Unfortunately Eclipse doesn’t seem to have an official installing, so it’s just a case of manually downloading and unzipping the files to your “Program Files” directory (or wherever you want to store them).

      Cheers,
      Mark

      Reply
      • Gerard
        Gerard says:

        Hi Mark,

        Thanks for the info.
        No, there is an installer ‘EclipseInstaller by Oomph’. I am using that one, but it gave me all the mentioned options.
        Regards,
        Gerard

        Reply
  10. namelesshacker
    namelesshacker says:

    hey
    it’s been good so far.
    Thank you for your help.
    but I can’t seem to find eclipse executable.
    Is eclipse supposed to be pre- installed or do i need to install it from somewhere? also, if it needs to be installed could you please provide a link to the preferred version?
    sorry if its supposed to be obvious, i am new here.
    thanks a lot

    Reply
  11. Mike
    Mike says:

    After multiple install attempts of Python 34 or 35, with and without ‘As Administrator,’ I get following when attempting to start python from command prompt:
    C:\Windows\System32>python
    Fatal Python error: Py_Initialize: unable to load the file system codec
    Traceback (most recent call last):
    File “c:\Python35-32\lib\encodings\__init__.py”. line 31, in
    zipimport.ZipImportError: can’t find module ‘codecs’

    C:\Windows\System32>

    I will now try Python 2 instructions to see if any different…

    Reply
      • Michael Garrant
        Michael Garrant says:

        Hi Mark
        I discovered a PYTHONHOME environment variable from a document camera install I had done many months ago. Merely removing that, since no longer using camera, corrected my problem and now Python 3.5.2 works perfectly. No other actions taken besides install instructions. Thanks for asking.

        Reply
      • salman
        salman says:

        Hi
        Mark i installed pythong 2.7.9 on my machine and have eclipse 4.22 classic. after intalling the pydev i still dont see pydev in other perspective window. nor do i see it windows/preferences window
        please suggest

        Reply
  12. Margaretha Haugen
    Margaretha Haugen says:

    I have a program written in python 2.3, but it does not run in windows anymore. Windows 10 say that python 2.3 is not available. How can I get my program to run in windows 10?

    Reply
  13. Suleiman Oluwaseun Ibrahim
    Suleiman Oluwaseun Ibrahim says:

    Sorry please I thought I have installed properly python 27 but I can’t open it from my window powershell and I have installed notepad++ text editor as well any procedure on hw I can rectify this appending problem? Your candid opinion will be highly appreciated

    Reply
  14. Kostas
    Kostas says:

    Hello, thanks for the great article! I seem to have a problem which I cannot shake. In windows 10, I am taking all the steps you described, but when I reach the point where I have to “open perspective” in eclipse, I cannot seem to find the PyDev option. The Installation of New Software performs correctly and PyDev for Eclipse is showing in Installed Software, but does not show the perspective. Has anyone seen this before? Any suggestions? Thank you!

    Reply
  15. Dave Birrell
    Dave Birrell says:

    Thanks Mark – wish I’d seen this at 5am yesterday morning.
    Have been struggling to install successfully using a couple of other (older) tutorials… all failed.
    FINALLY have it installed after your great tute.
    Thanks a tonne.
    Dave

    Reply
  16. Jean2808
    Jean2808 says:

    Hello Mark, it is Jean from France.

    I have windows10 and Python3.6.1 (latest release).
    I can’t read files content … I am getting crazy !!!

    Python code :
    from os import *
    chdir(“C:/Users/jfdch/Desktop/User/Python.3.6.1/Essais”)
    Fichier1 = open(“File”,O_RDONLY)
    print(type(Fichier1))
    Fichier1.read(2)

    Python shell result : I have ‘int’ type for file instead of ‘_io.TextIOWrapper’
    and of course the read() method does not work

    === RESTART: C:\Users\jfdch\Desktop\User\Python.3.6.1\Essais\fichiers1.py ===

    Traceback (most recent call last):
    File “C:\Users\jfdch\Desktop\User\Python.3.6.1\Essais\fichiers1.py”, line 6, in
    Fichier1.read(2)
    AttributeError: ‘int’ object has no attribute ‘read’
    >>>

    Reply
  17. Aswin Kumar
    Aswin Kumar says:

    Hi,
    I have installed Python in my windows 10 system and after that I tried to configure with eclipse, I followed all procedures what you mentioned above. Unfortunately after clicking install PyDev s/w …. it shows error as “Installing Software has encountered a problem”.
    Can you help me how to fix this.

    Reply

Trackbacks & Pingbacks

  1. […] 2.7 installed. If you do not have Python installed on Windows, there is a great guide available at https://www.londonappdeveloper.com/. A basic understanding of Python is required, but I will try to comment the code as best as […]

  2. […] site where you can discover how to perform these tasks under Windows 10. The article I suggest is: Setting up your Windows 10 System for Python Development (PyDev, Eclipse, Python). You don’t need to setup Eclipse or do anything else fancy. Once you have Python installed, […]

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

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