0

When I try to install any module for python using command prompt or PowerShell, then there is a message that shows up, the message is:

 File "c:\users\opkp\app data\local\programs\python\python38-32\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\opkp\appdata\local\programs\python\python38-32\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\OPKP\AppData\Local\Programs\Python\Python38-32\Scripts\pip.exe\__main__.py", line 5, in <module>
  File "c:\users\opkp\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\__init__.py", line 19, in <module>
    from pip._vendor.urllib3.exceptions import DependencyWarning
  File "c:\users\opkp\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\urllib3\__init__.py", line 7, in <module>
    from .connectionpool import (
  File "c:\users\opkp\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\urllib3\connectionpool.py", line 11, in <module>
    from .exceptions import (
ModuleNotFoundError: No module named 'pip._vendor.urllib3.exceptions'

I know it has the names of my drivers and all. Due to this, I am not able to download any module for python.

Things that I have tried and that failed me:

  1. I Googled it
  2. YouTube videos were not tackling my problem, what they were telling me is just how to install pip (which I already have) and how to add the path (which I have already done)

Commands that gave this error:

pip install flask

py -m ( I don't remember it fully but i wrote it correctly )

pip3 install flask

and i have also uninstalled and installed python etc.

Here is my error message in the command prompt: enter image description here

I also tried that py -m statement but that also gave the same result.

AMC
  • 2,642
  • 7
  • 13
  • 35
OPKP
  • 9
  • 4
  • Have you tried just removing Python/pip and starting fresh? Are you using virtual environments? – AMC Apr 04 '20 at 20:24
  • yeha but the final results were the same – OPKP Apr 05 '20 at 08:51
  • 1
    If after all the suggestions, there is still no improvement it may lead to think that there may be something fundamentally wrong with your setup or the way you use it. You may want to head over to [_Super User_](https://superuser.com) for some more general advice, since your issue does not seem to be related to _programming_ or _software development_ directly. – sinoroc Apr 06 '20 at 10:07
  • ok i'll that out too – OPKP Apr 06 '20 at 14:16

1 Answers1

-2

You can try to re-install pip or even completely re-install Python.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Mesut Uçar
  • 162
  • 1
  • 8