Right-click the download link and choose "Save Link As" (Firefox) or "Save target as" (Internet Explorer). Open a command prompt and run get-pip.py by entering the full path to python.exe and get-pip.py. For example:
C:\Python27\python.exe "C:\Users\UserName\Downloads\get-pip.py"
I recommend using the full path to python.exe in case it's either not on the search PATH
or the wrong version would be found. Double quotes are required for a path that contains spaces. If the above command fails with an "Access denied" error, retry the installation in a command prompt that has administrator privileges enabled, i.e. right-click and choose "Run as administrator".
Install Swampy from the same command prompt:
C:\Python27\python.exe -m pip install swampy
-m pip
runs the pip module as a script. There's also pip.exe in the Scripts subdirectory.
Personally, I'd use GnuWin32 wget.exe (w/ Mozilla certdata.txt) to download the install script and run it with the py launcher:
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
py -2.7 get-pip.py
py -2.7 -m pip install swampy
As to cd
, that's an internal command in the cmd.exe shell (command prompt) that [c]hanges the current [d]irectory on a drive (chdir
is a synonym). If the new directory isn't an absolute path, it's resolved relative to the current directory on the current drive, or the drive specified in the command (e.g. cd D:Downloads
changes the directory on drive D: to the Downloads subdirectory of its current directory). The /D
switch makes cd
change the current drive as well.
If the new directory is on the current drive (or /D
was used), the cd
command also changes the current working directory of the shell process, which will be inherited by an executed program. Otherwise it just sets one of the cmd shell's hidden environment variables for the drive path*.
Entering just cd
will print the current directory on the current drive. Entering cd D:
will print the current directory on drive D:.
I generally prefer pushd
, since it always changes the current drive; maps a temp drive for a UNC path; and enables returning to the previous directory with popd
. Entering just pushd
will print the stack of pushed directories.
For more information on the available commands, enter help
in the command prompt. Here's an index of commands. Commands that are internal to the cmd shell are marked with a bullet (•).
* For example, =C:
, =D:
, and so on. A Windows process has only a single current working directory, so cmd.exe has to use this trick to emulate the DOS per-drive working directory. Due to a bug in cmd, you can see these 'hidden' environment variables by entering set ""
.