0

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.

  • 1
    Refer [this](https://stackoverflow.com/questions/32639074/why-am-i-getting-importerror-no-module-named-pip-right-after-installing-pip) for further clarification. Question seems to be duplicated. – SAL Aug 03 '20 at 05:16
  • A search for this error turns up a few existing Q/As. If those existing Q/As don't solve your problem then include them as references and explain why it doesn't help you. – As you start out here – _Welcome to Stack Overflow_ – you may also want to take the [tour](https://stackoverflow.com/tour), read about [what's on-topic](https://stackoverflow.com/help/on-topic), and read [How to Ask a Good Question](https://stackoverflow.com/help/how-to-ask). – Ivo Mori Aug 03 '20 at 05:17
  • Please also show the full error message for your attempt to use `python -m pip install requests`. Also show the full results for `py --version`, `python --version` and `pip3 --version`; and if possible, the Python-related portions of your PATH. – Karl Knechtel Aug 03 '20 at 05:20

1 Answers1

-2

You have to download python first from this link . Add python to system path and then you'll be good to go

  • I did that. I downloaded the most recent version and added both C:\Python38 and the other, main python directory to system PATH – Fuzzy Muffin Aug 03 '20 at 05:21
  • on cmd type python, if it takes you into python terminal then installation was successful otherwise you've to install it again – Priyanshu Jha Aug 03 '20 at 05:55
  • I already knew python was installed, because I could run python and run modules I had made. It wasn't a question of if python was installed, it was an issue with pip specifically. – Fuzzy Muffin Aug 03 '20 at 18:56