Installing Swampy for Python 2.7 Help Please
Question: I've been trying to do this for 3 hours. I have windows. I'm using [this
official guide](http://www.greenteapress.com/thinkpython/swampy/install.html):

So for step 2 for the windows installation for Python 2: it says: "To see if
you have Tkinter, launch python; then at the Python prompt, type

    
    
    >>> import Tkinter
    

When I do this from the python shell, it says `ImportError: No module named
'Tkinter'`. But when I type in Python in the command prompt, and I type
`import Tkinter`, nothing happens. So which one do I look at? The instructions
aren't clear.

Okay so going on, step 2 "install Swampy" is what i'm having trouble with too.
To download pip, you have to go to [this link](http://www.pip-
installer.org/en/latest/installing.html). But when you get there, it says to
download off the link that says "get-pip.py." What in the world? It's just a
long wall of text. It doesn't even ask me if I want to download anything. How
are we supposed to download this???

Also the instructions say " If you still don't have pip, you can download the
Swampy zip file from the Cheese shop. Unzip it, then cd into the directory it
creates and run:

    
    
    `python setup.py install`
    

What does `cd into the directory it creates and run...` mean??? I am so lost
and would be eternally grateful if someone helps. Thanks.


Answer: Right-click the [download
link](https://raw.github.com/pypa/pip/master/contrib/get-pip.py) 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](http://getgnuwin32.sourceforge.net) wget.exe
(w/ Mozilla [certdata.txt](http://mxr.mozilla.org/mozilla-
release/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1)) to download
the install script and run it with the [py
launcher](https://bitbucket.org/vinay.sajip/pylauncher/raw/tip/Doc/launcher.rst):

> `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`](http://ss64.com/nt/cd.html), 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`](http://ss64.com/nt/pushd.html), 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](http://ss64.com/nt). 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 ""`. 

