I've been trying to do this for 3 hours. I have windows. I'm using this official guide:
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. 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.
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:
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:
-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:
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 makescd
change the current drive as well.If the new directory is on the current drive (or
/D
was used), thecd
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. Enteringcd 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 withpopd
. Entering justpushd
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 enteringset ""
.