[Tutor] pip install issues

Alan Gauld alan.gauld at yahoo.co.uk
Sat Feb 19 20:02:36 EST 2022


On 19/02/2022 20:34, ShockTube wrote:

> Trying to do a pip install and not successful. Have established that cannot
> run that command within an interpreter, Understand that. Answer from Stack
> Overflow talked of a Python Terminal to run command. 

That usually just means the Python interactive prompt.
Or within an IDE it might mean a Python prompt window.
There is really no such thing as a python terminal.

> the interpreter is this magical place that will accept and process a pip
> install command, and anything similar.

pip was originally intended to be run from the OS shell prompt.
But that  an lead to some issues and most folks today recommend running
it from python using the -m(module) flag:

$ python -m pip install somepackage

That should ensure that everything gets installed in the right
place and you see meaningful error messages if it doesn't.

If it doesn't work and you can't see what's wrong come back
with an error trace and we'll see what we can do.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list