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
• 11,270 points
120 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
• 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

Python error " import requests ImportError: No module named requests"

Hi @Vasgi, for the code you're trying ...READ MORE

answered Aug 5, 2019 in Python by Layla
4,418 views
0 votes
1 answer

import NumPy as np ImportError: No module named NumPy

Hi@akhtar, Whenever you import a module, python will ...READ MORE

answered Apr 9 in Python by MD
• 24,500 points
594 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
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
• 24,500 points
214 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
• 24,500 points
369 views