Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python troubleshooting: ImportError: cannot import name 'main'

I'm facing a problem with Package Installation, pip. I am using Python 3.6.

When I try to install a package with pip I receive the following message in the cmd.

*C:\Python36\Scripts>pip intstall --user httpie
Traceback (most recent call last):
  File "c:\python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python36\Scripts\pip.exe\__main__.py", line 5, in <module>
ImportError: cannot import name 'main'*

It happened when I upgraded the pip, before it worked. I tried to uninstal the Python and installed this again but it does not work. I cannot find the solution, any ideas?

like image 397
Jacob Fuchs Avatar asked Jan 24 '26 21:01

Jacob Fuchs


1 Answers

You can also downgrade to pip 9.x using

python -m pip install -U "pip<10"
like image 172
Nils Werner Avatar answered Jan 26 '26 10:01

Nils Werner