ImportError: cannot import name 'main' in pip

0 votes

Hi Guys,

I am getting this below error, when I am trying to install numpy in my system.

$ pip3 install numpy
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'

How can I solve this error?

Apr 15 in Python by akhtar
• 11,270 points
214 views

1 answer to this question.

0 votes

Hi@akhtar,

To avoid this error, you should upgrade pip in your system.

$ sudo pip install pip --upgrade

If it will not work then uninstall pip and install again. 

answered Apr 15 by MD
• 24,500 points

Related Questions In Python

0 votes
1 answer

How to resolve ImportError: cannot import name 'add' in python ?

There's no module called "add" in random. ...READ MORE

answered Feb 12, 2019 in Python by Mark
1,785 views
0 votes
1 answer

Error:after upgrading pip: cannot import name 'main'

Hello @kartik, You must have inadvertently upgraded your ...READ MORE

answered 1 day ago in Python by Niroj
• 23,950 points
8 views
0 votes
1 answer

Install pip in Python 3.4

Don't worry! Python already comes in default ...READ MORE

answered May 1, 2018 in Python by aayushi
• 750 points
297 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 963 views
0 votes
0 answers
0 votes
1 answer

ImportError: cannot import name 'PILLOW_VERSION' from 'PIL' (unknown location)

Hi@akhtar, I think there is a problem in ...READ MORE

answered Apr 22 in Python by MD
• 24,500 points
368 views
+1 vote
1 answer

ImportError: cannot import name 'appdirs'

Hi@akhtar, I think you missed some module to ...READ MORE

answered May 5 in Python by MD
• 24,500 points
120 views