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, 2020 in Python by akhtar
• 38,230 points
2,855 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, 2020 by MD
• 95,440 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,216 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,440 points
1,745 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, 2020 in Python by Niroj