Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running into issues with appdirs 1.4.1

See original GitHub issue

Running into issues with appdirs 1.4.1, which appears to have been released today. Am getting the issue below. More details can be found in this log. Issues exist for other Python versions as well.

FileNotFoundError: [Errno 2] No such file or directory: '/home/travis/virtualenv/python3.6.0/lib/python3.6/site-packages/appdirs-1.4.1.dist-info/METADATA'

cc @alimanfoo

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:25
  • Comments:23 (6 by maintainers)

github_iconTop GitHub Comments

akszydelkocommented, Feb 24, 2017

I have a quick work around. The appdirs is a dependency of other third party apps in my project, but I have find out that if I execute the following command:

$ pip install appdirs --upgrade

just before my regular

$ pip install -r requirements.txt --upgrade

It works like a charm. Maybe that will help someone.

P.S. I in the third party app the dependency to appdirs is defined as appdirs>=1.4.0

jarcanecommented, Mar 8, 2017

I am having this issue on 1.4.3 as well. The aforementioned work around doesn’t seem to work for me either.


~/p/site-authentication (master|✔) $ vf new -p (which python3) site-auth
Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/johnberry/.virtualenvs/site-auth/bin/python3.6
Also creating executable in /Users/johnberry/.virtualenvs/site-auth/bin/python
Installing setuptools, pip, wheel...done.
(site-auth) ~/p/site-authentication (master|✔) $ pip3 install appdirs --upgrade
Requirement already up-to-date: appdirs in /Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages
(site-auth) ~/p/site-authentication (master|✔) $ 
pip3 install -r requirements.txt --upgrade
Collecting appdirs==1.4.0 (from -r requirements.txt (line 1))
  Using cached appdirs-1.4.0-py2.py3-none-any.whl
Collecting awscli==1.11.19 (from -r requirements.txt (line 2))
  Using cached awscli-1.11.19-py2.py3-none-any.whl
Collecting bcrypt==3.1.1 (from -r requirements.txt (line 3))
Collecting blinker==1.4 (from -r requirements.txt (line 4))
Collecting boto3==1.4.3 (from -r requirements.txt (line 5))
  Using cached boto3-1.4.3-py2.py3-none-any.whl
Collecting botocore==1.4.76 (from -r requirements.txt (line 6))
  Using cached botocore-1.4.76-py2.py3-none-any.whl
Collecting cffi==1.9.1 (from -r requirements.txt (line 7))
  Using cached cffi-1.9.1-cp36-cp36m-macosx_10_6_intel.whl
Collecting click==6.7 (from -r requirements.txt (line 8))
  Using cached click-6.7-py2.py3-none-any.whl
Collecting colorama==0.3.7 (from -r requirements.txt (line 9))
  Using cached colorama-0.3.7-py2.py3-none-any.whl
Collecting coverage==4.2 (from -r requirements.txt (line 10))
Collecting cryptography==1.7.1 (from -r requirements.txt (line 11))
  Using cached cryptography-1.7.1-cp36-cp36m-macosx_10_10_x86_64.whl
Collecting datadog==0.14.0 (from -r requirements.txt (line 12))
Collecting decorator==4.0.10 (from -r requirements.txt (line 13))
  Using cached decorator-4.0.10-py2.py3-none-any.whl
Collecting docutils==0.12 (from -r requirements.txt (line 14))
  Using cached docutils-0.12-py3-none-any.whl
Collecting driftwood==1.1.21 (from -r requirements.txt (line 15))
Collecting flake8==3.2.1 (from -r requirements.txt (line 16))
  Using cached flake8-3.2.1-py2.py3-none-any.whl
Collecting Flask==0.12 (from -r requirements.txt (line 17))
  Using cached Flask-0.12-py2.py3-none-any.whl
Obtaining Flask_Inputs from git+ (from -r requirements.txt (line 18))
  Cloning (to 295fab3a887deebedbe154652c0a4382bf08eff0) to /Users/johnberry/.virtualenvs/site-auth/src/flask-inputs
  Could not find a tag or branch '295fab3a887deebedbe154652c0a4382bf08eff0', assuming commit.
Collecting Flask-Limiter==0.9.3 (from -r requirements.txt (line 19))
Collecting future==0.16.0 (from -r requirements.txt (line 20))
Collecting gunicorn==19.6.0 (from -r requirements.txt (line 21))
  Using cached gunicorn-19.6.0-py2.py3-none-any.whl
Collecting httplib2==0.9.2 (from -r requirements.txt (line 22))
Collecting idna==2.2 (from -r requirements.txt (line 23))
  Using cached idna-2.2-py2.py3-none-any.whl
Collecting itsdangerous==0.24 (from -r requirements.txt (line 24))
Collecting Jinja2==2.9.4 (from -r requirements.txt (line 25))
  Using cached Jinja2-2.9.4-py2.py3-none-any.whl
Collecting jmespath==0.9.0 (from -r requirements.txt (line 26))
  Using cached jmespath-0.9.0-py2.py3-none-any.whl
Collecting libnacl==1.4.3 (from -r requirements.txt (line 27))
Collecting limits==1.2.0 (from -r requirements.txt (line 28))
Collecting MarkupSafe==0.23 (from -r requirements.txt (line 29))
Collecting mccabe==0.5.2 (from -r requirements.txt (line 30))
  Using cached mccabe-0.5.2-py2.py3-none-any.whl
Collecting mock==2.0.0 (from -r requirements.txt (line 31))
  Using cached mock-2.0.0-py2.py3-none-any.whl
Collecting mockredispy==2.9.3 (from -r requirements.txt (line 32))
Collecting mongoengine==0.10.6 (from -r requirements.txt (line 33))
Collecting mongomock==3.7.0 (from -r requirements.txt (line 34))
  Using cached mongomock-3.7.0-py2.py3-none-any.whl
Collecting newrelic== (from -r requirements.txt (line 35))
Collecting oauth2client==4.0.0 (from -r requirements.txt (line 36))
  Using cached oauth2client-4.0.0-py2.py3-none-any.whl
Requirement already up-to-date: packaging==16.8 in /Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages (from -r requirements.txt (line 37))
Collecting pbr==1.10.0 (from -r requirements.txt (line 38))
  Using cached pbr-1.10.0-py2.py3-none-any.whl
Collecting phonenumbers==8.0.1 (from -r requirements.txt (line 39))
  Using cached phonenumbers-8.0.1-py2.py3-none-any.whl
Collecting py==1.4.31 (from -r requirements.txt (line 40))
  Using cached py-1.4.31-py2.py3-none-any.whl
Collecting pyasn1==0.1.9 (from -r requirements.txt (line 41))
  Using cached pyasn1-0.1.9-py2.py3-none-any.whl
Collecting pyasn1-modules==0.0.8 (from -r requirements.txt (line 42))
  Using cached pyasn1_modules-0.0.8-py2.py3-none-any.whl
Collecting pycodestyle==2.2.0 (from -r requirements.txt (line 43))
  Using cached pycodestyle-2.2.0-py2.py3-none-any.whl
Collecting pycountry==1.20 (from -r requirements.txt (line 44))
Collecting pycparser==2.17 (from -r requirements.txt (line 45))
Collecting pyflakes==1.3.0 (from -r requirements.txt (line 46))
  Using cached pyflakes-1.3.0-py2.py3-none-any.whl
Collecting PyJWT==1.4.2 (from -r requirements.txt (line 47))
  Using cached PyJWT-1.4.2-py2.py3-none-any.whl
Collecting pymongo==3.4.0 (from -r requirements.txt (line 48))
Collecting pyparsing==2.1.10 (from -r requirements.txt (line 49))
  Using cached pyparsing-2.1.10-py2.py3-none-any.whl
Collecting PySocks==1.6.6 (from -r requirements.txt (line 50))
Collecting pytest==3.0.4 (from -r requirements.txt (line 51))
  Using cached pytest-3.0.4-py2.py3-none-any.whl
Collecting pytest-cov==2.4.0 (from -r requirements.txt (line 52))
  Using cached pytest_cov-2.4.0-py2.py3-none-any.whl
Collecting python-dateutil==2.6.0 (from -r requirements.txt (line 53))
  Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
Collecting pytz==2016.7 (from -r requirements.txt (line 54))
  Using cached pytz-2016.7-py2.py3-none-any.whl
Collecting PyYAML==3.12 (from -r requirements.txt (line 55))
Collecting redis==2.10.5 (from -r requirements.txt (line 56))
  Using cached redis-2.10.5-py2.py3-none-any.whl
Collecting requests==2.12.3 (from -r requirements.txt (line 57))
  Using cached requests-2.12.3-py2.py3-none-any.whl
Collecting rsa==3.4.2 (from -r requirements.txt (line 58))
  Using cached rsa-3.4.2-py2.py3-none-any.whl
Collecting s3transfer==0.1.9 (from -r requirements.txt (line 59))
  Using cached s3transfer-0.1.9-py2.py3-none-any.whl
Collecting sentinels==1.0.0 (from -r requirements.txt (line 60))
Collecting simplejson==3.10.0 (from -r requirements.txt (line 61))
Requirement already up-to-date: six==1.10.0 in /Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages (from -r requirements.txt (line 62))
Collecting statsd==3.2.1 (from -r requirements.txt (line 63))
  Using cached statsd-3.2.1-py2.py3-none-any.whl
Collecting twilio==5.7.0 (from -r requirements.txt (line 64))
Collecting Werkzeug==0.11.15 (from -r requirements.txt (line 65))
  Using cached Werkzeug-0.11.15-py2.py3-none-any.whl
Collecting WTForms==2.1 (from -r requirements.txt (line 66))
Requirement already up-to-date: setuptools>=11.3 in /Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages (from cryptography==1.7.1->-r requirements.txt (line 11))
Installing collected packages: appdirs, python-dateutil, jmespath, docutils, botocore, s3transfer, PyYAML, pyasn1, rsa, colorama, awscli, pycparser, cffi, bcrypt, blinker, boto3, click, coverage, idna, cryptography, requests, decorator, simplejson, datadog, driftwood, mccabe, pycodestyle, pyflakes, flake8, itsdangerous, Werkzeug, MarkupSafe, Jinja2, Flask, WTForms, Flask-Inputs, limits, Flask-Limiter, future, gunicorn, httplib2, libnacl, pbr, mock, mockredispy, pymongo, mongoengine, sentinels, mongomock, newrelic, pyasn1-modules, oauth2client, phonenumbers, py, pycountry, PyJWT, pyparsing, PySocks, pytest, pytest-cov, pytz, redis, statsd, twilio
  Found existing installation: appdirs 1.4.3
    Uninstalling appdirs-1.4.3:
      Successfully uninstalled appdirs-1.4.3
  Rolling back uninstall of appdirs
Traceback (most recent call last):
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pkg_resources/", line 2813, in _dep_map
    return self.__dep_map
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pkg_resources/", line 2624, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pkg_resources/", line 2804, in _parsed_pkg_info
    return self._pkg_info
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pkg_resources/", line 2624, in __getattr__
    raise AttributeError(attr)
AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pip/", line 215, in main
    status =, args)
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pip/commands/", line 342, in run
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pip/req/", line 784, in install
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pip/req/", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pip/req/", line 1064, in move_wheel_files
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pip/", line 247, in move_wheel_files
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pip/", line 140, in distutils_scheme
    d = Distribution(dist_args)
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/setuptools/", line 320, in __init__
    _Distribution.__init__(self, attrs)
  File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/", line 281, in __init__
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/setuptools/", line 386, in finalize_options
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pkg_resources/", line 2324, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pkg_resources/", line 862, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pkg_resources/", line 2568, in requires
    dm = self._dep_map
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pkg_resources/", line 2815, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pkg_resources/", line 2824, in _compute_dependencies
    for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pkg_resources/", line 2806, in _parsed_pkg_info
    metadata = self.get_metadata(self.PKG_INFO)
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pkg_resources/", line 1468, in get_metadata
    value = self._get(self._fn(self.egg_info, name))
  File "/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/pkg_resources/", line 1577, in _get
    with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/johnberry/.virtualenvs/site-auth/lib/python3.6/site-packages/appdirs-1.4.3.dist-info/METADATA'
Read more comments on GitHub >

github_iconTop Results From Across the Web

install_tempest failed at uninstalling appdirs 1.4.1
Hi,. Pinning setuptools version in global-requirements.txt does not fix this issue because devstack installs tempset using tox which will ...
Read more >
ImportError: No module named 'appdirs' - Stack Overflow
I ran across the same problem after solving the "missing pyparsing ... in <module> import appdirs ImportError: No module named appdirs.
Read more >
appdirs - PyPI
A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".
Read more >
Changelog - pip documentation v22.3.1
Remove appdirs as a vendored dependency. Upgrade distlib to 0.3.3. Upgrade distro to 1.6.0. Patch pkg_resources to use platformdirs rather than appdirs.
Read more >
devel/py-appdirs: Python module for determining platform ...
To add the package, run one of these commands: pkg install devel/py-appdirs; pkg install py39-appdirs. NOTE: If this package has multiple flavors (see...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found