On 6/7/23 10:08, MRAB via Python-list wrote:
On 2023-06-07 15:54, Florian Guilbault via Python-list wrote:
Dear Python Technical Team,

I hope this email finds you well. I am reaching out to you today to seek
assistance with an issue I am facing regarding the installation of 'pip'
despite my numerous attempts to resolve the problem.

Recently, I performed installation, uninstallation, and even repair
operations on Python 3.10 on my computer. However, I have noticed that
'pip' has never been installed successfully. When I check via the command
prompt, I receive the following error: "'pip' is not recognized as an
internal or external command, operable program, or batch file."

I have tried several approaches to resolve this issue. I have verified that
the PATH environment variable is correctly configured to include the path
to the Python Scripts directory.

I'm assuming you checked - say, with Explorer - that pip.exe really is where you think it is? Anyway, if you ask a Windows shell (cmd) to locate it, and it doesn't, then your PATH is not set up correctly after all.

where pip

should give you back a path that ends witn ...\Scripts\pip.exe

That said, the suggestions already given are on point. Running pip as a module (rather than as a standalone command) assures that it's associated with the Python you want it associated with. In today's world, a lot of developer systems end up with multiple Python installations (*), and you don't want to use a pip that is bound to the wrong one, or the next email will be "I installed foo module but my Python fails to import it".

(*) You can have different Python versions for compat checking, you can have project-specific virtualenvs, you can have Pythons that come bundled with a subsystem like Conda, etc.

On Windows, it's recommended to use the Python Launcher and the pip module:

py -m pip install whatever


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to