pypa/pip

ModuleNotFoundError: No module named 'pip'

supercowil opened this issue · 2 comments

Description

im trying to run py commands but pip seems to not work for some reason
C:\Users\User>pip
Traceback (most recent call last):
File "D:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "D:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "D:\Users\User\AppData\Local\Programs\Python\Python310\Scripts\pip.exe_main
.py", line 4, in
ModuleNotFoundError: No module named 'pip'

have tried reinstalling python and pip already still doesnt seem to work

Expected behavior

for pip to work

pip version

latest i think

Python version

3.10 + 3.12

OS

64 bit windows 10 pro

How to Reproduce

pip install

Output

No response

Code of Conduct

You should run pip through the way you invoke Python itself. If you execute a Python program via py myfile.py, you should try py -m pip. If you use python myfile.py, then try python -m pip. This will ensure you're executing the right pip. Otherwise,
you will probably be better served by reaching out to peers or help forums, such as Python Discuss help category, /r/learnpython on reddit, Python Discord's #python-help channel, #python on Libera.chat (IRC), python-list or python-tutor mailing lists, or StackOverflow.