[Tutor] Fwd: Newbie trying to get pip run on windows 7

eryk sun eryksun at gmail.com
Thu Apr 21 00:55:58 EDT 2016


On Tue, Apr 19, 2016 at 11:26 PM, Gustavo Davis via Tutor
<tutor at python.org> wrote:
>  But for some reason after I made the changes and saved them they wont
>  run. I mean once I go to the file and right click on them and click run
>  the cmd prompt pops up for a moment and then it just closes down and the
>  pip module never runs in python.

When you run a .py script from Explorer, Windows creates a new console
for the script's standard input and output, but this console closes as
soon as the script exits (i.e. when the python.exe process exits).
Instead you can run the script from an existing cmd shell to inherit
the shell's console.

> ;C:\Python34\Scripts\pip

There's no "Scripts\pip" directory.

Only add fully qualified directories to PATH, separated by a
semicolon, without quotes, and with no spaces between entries. You can
reference another environment variable in PATH, but only if the
variable doesn't reference other environment variables.

Add ;.PY to PATHEXT to allow running "command" instead of "command.py".

> >>> import pyperclip
> Traceback (most recent call last):
>   File "<pyshell#1>", line 1, in <module>
>     import pyperclip
> ImportError: No module named 'pyperclip'

With PATH set up correctly, you can install this module from a cmd
shell using "pip install pyperclip".

pip searches for packages on pypi.python.org. This should work fine
for pure-Python packages and those with a WHL or EGG that's built for
your version of Python. Some source-only packages require building
extension modules. If your system isn't configured to build
extensions, look for an unofficial WHL on Christoph Gohlke's site:

http://www.lfd.uci.edu/~gohlke/pythonlibs


More information about the Tutor mailing list