ImportError: cannot import name 'appdirs'

+1 vote

Hi Guys,

I am trying to install tweepy module in my Linux system, but it is showing me the below error.

$ pip install tweepy
Traceback (most recent call last):
    File "/Users/user_name/anaconda3/bin/pip", line 6,
    in <module> from pip._internal.cli.main import main
    File "/Users/user_name/anaconda3/lib/python3.6/site-
    packages/pip/_internal/cli/main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete
    from pip._vendor import appdirs as _appdirs
      ImportError: cannot import name 'appdirs'

How can I solve this error?

May 5 in Python by akhtar
• 25,030 points
599 views

1 answer to this question.

0 votes

Hi@akhtar,

I think you missed some module to install. You can use the below given codes to avoid this error.

wget https://pypi.python.org/packages/48/69/d87c60746b393309ca30761f8e2b49473d43450b150cb08f3c6df5c11be5
/appdirs-1.4.3.tar.gz
tar -xvf appdirs-1.4.3.tar
cd appdirs-1.4.3
sudo python setup.py install
answered May 5 by MD
• 56,480 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
2,143 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 in Python by MD
• 56,480 points
252 views
0 votes
1 answer

ImportError: cannot import name 'render_to_response' from 'django.shortcuts'

Hello @kartik, The render_to_response shortcut was deprecated in Django 2.0, and ...READ MORE

answered Jul 2 in Python by Niroj
• 58,500 points
423 views
0 votes
1 answer

ImportError: cannot import name find_spec” when I start a new Django project?

Hello @kartik, find_spec isn't available in Python 3.2.3; it ...READ MORE

answered Aug 5 in Python by Niroj
• 58,500 points
130 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 1,357 views
0 votes
0 answers
0 votes
1 answer
0 votes
1 answer

ImportError: cannot import name 'main' in pip

Hi@akhtar, To avoid this error, you should upgrade ...READ MORE

answered Apr 15 in Python by MD
• 56,480 points
819 views
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
• 56,480 points
1,666 views