In Windows you should, like in Linux, use the command prompt to install your packages using pip. However, for this to work the Python executable must be in the system path. Also, all your different versions of Python need the packages installed individually.
The issue is that in the installations of all the different versions of Python, all of them have a executable called python.exe i.e. same name!
Thus, you need to rename them, for example, to python27, python33, etc. to access them individually. By renaming them and calling "pythonXX" in cmd prompt this can be done, otherwise, cmd will just take the first instance of python.exe in the system path when "python" is called in cmd.
This is particularly problematic if Anaconda2 is also installed because all packages will just there. Once you are able to run your different versions of Python from the command line you should be able to install packages correctly using pip.
In summary:
- Rename python.exe to pythonXX.exe
- Add the folder in which pythonXX.exe is located to the system path (see below)
- Start cmd prompt and write "pythonXX -m pip install -U pip" - This command updates pip. If it dosen't work restart the computer to update path and try again.
- Now you should be able to install packages into the correct versions using pip.
- Note that you should write e.g. "pythonXX -m pip install -U scikit-learn" to install your libraty.
Once the packages are installed into the right folders, they should also be available from IDLE and you are ready to go.
To access system path in Windows
- Go to Control Panel
- Select “System” from the context menu.
- Click “Advanced system settings”
- Go to the “Advanced” tab
- Click “Environment Variables…”
- Click variable called “Path” and click “Edit…”
- Click “New”
- Enter the path to the folder containing the executable you want on your PATH. For example, to add python33.exe, add: "C:\Python33\" or what your path to python33.exe is.