[Tutor] confused about Pypi

Mats Wichmann mats at wichmann.us
Sat Oct 28 18:15:19 EDT 2017


On 10/28/2017 02:43 PM, Mark Anderson wrote:
> Hello, I am currently doing an online course to learn Python. Generally ive followed it well and am enjoying my first go at programming. However the description of how to get modules from PyPi has left me confused. Ive only recently downloaded python so it already has pip installed. As I understand it I have to write certain text into the command prompt (I’m using windows 10). It tells me that python -m is not recognised. 
> Can anyone help please
> Regards
> Mark Anderson

Snide answer:  "don't use Windows, it's a terrible platform for
programmers".

If the problem is you can run Python from cmd.exe (or Powershell), but
you can't run "python -m pip ...", it's because pip ends up in a strange
place sometimes: the Scripts subdirectory of the Python installation,
and this location may not be in your path or in the Python module path.
This may need to be added. Have a hunt on the internet about this, there
should be some resources that help.

If pip is found (possibly due to scripts dir in path), then you should
just be able to run "pip install <pkgname>" without including the
"python -m" part.

On a system here with Python 3.6, {my home
directory}/Local/Programs/Python/Python36-32/Scripts/pip.exe is where
pip lives.

If that's not the right problem, then still hunting on the internet
should help, just about every conceivable problem on Windows has been
encountered and solved. And there are a lot of them, sadly.


More information about the Tutor mailing list