I am using Windows 10.
I want to do some basic python web scraping, and I had just started using a tutorial to find out how.
First step (in command prompt): pip3 install requests
, and it returned an error saying that no module named pip was found (full error at end of post). I tried again with just pip
, and then python3
, but pip
gave me no difference, and python3
did nothing. I have both 32 and 64 bit Python 3.8.3, and tried importing the package requests on both, but got a module-not-found error. I even re-installed Python, but still no luck. I have made sure both the pip directory and the python directory for 32-bit were in PATH, but it doesn't help. Finally, python -m pip install requests
returned
C:\Python38\python.exe: No module named pip
Here is the full (original) error:
C:\Users\my_name>pip3 install requests
Traceback (most recent call last):
File "c:\python34\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python38\Scripts\pip3.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'pip'
Using python3
instead of pip3
only returned a blank space, and did not download anything.
EDIT:
Fix 1: Use easy_install
instead of pip install
. Not pretty, but it worked.
Fix 2 (RECCOMENDED): simply do python -m ensurepip
. I don't know why I forgot that existed. Sorry for wasting your time, helpful commenters! At least this is a new thing for worried programmers to find.