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, 2020 in Python by akhtar
• 38,260 points
4,925 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, 2020 by MD
• 95,460 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 13, 2019 in Python by Mark
4,671 views
0 votes
1 answer

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

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

answered Jun 5, 2020 in Python by Niroj
• 82,880 points
2,860 views
0 votes
1 answer

ImportError:cannot import name numpy_type_map

Hi@MengWel, You need to install the torch library first ...READ MORE

answered Jun 23, 2020 in Python by MD
• 95,460 points
2,138 views
0 votes
2 answers
+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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,397 views
0 votes
1 answer
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, 2020 in Python by MD
• 95,460 points
7,508 views
+1 vote
1 answer

ImportError: cannot import name 'appdirs'

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

answered May 5, 2020 in Python by MD
• 95,460 points
3,862 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP