Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'pip' #12692

Closed
1 task done
supercowil opened this issue May 10, 2024 · 2 comments
Closed
1 task done

ModuleNotFoundError: No module named 'pip' #12692

supercowil opened this issue May 10, 2024 · 2 comments
Labels
type: support User Support

Comments

@supercowil
Copy link

supercowil commented May 10, 2024

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

@supercowil supercowil added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels May 10, 2024
@ichard26
Copy link
Member

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.

@ichard26 ichard26 added type: support User Support and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels May 11, 2024
@ichard26
Copy link
Member

If that fails, then you can try python -m ensurepip to bootstrap a pip and then try to use pip again: python -m pip.

Anyway, I'll be closing this as it's been three weeks without follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: support User Support
Projects
None yet
Development

No branches or pull requests

2 participants