Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named functools_lru_cache #537

Closed
mscansian opened this issue Apr 28, 2018 · 3 comments
Closed

ImportError: No module named functools_lru_cache #537

mscansian opened this issue Apr 28, 2018 · 3 comments

Comments

@mscansian
Copy link

I'm getting the following exception when using arrow on Python 2.7.
Not sure if it's related to #497

Traceback (most recent call last):
  File "40-upload_to_strava.py", line 14, in <module>
    from stravalib import Client
  File "/home/matheus/.local/lib/python2.7/site-packages/stravalib/__init__.py", line 1, in <module>
    from stravalib.client import Client
  File "/home/matheus/.local/lib/python2.7/site-packages/stravalib/client.py", line 14, in <module>
    import arrow
  File "/home/matheus/.local/lib/python2.7/site-packages/arrow/__init__.py", line 3, in <module>
    from .arrow import Arrow
  File "/home/matheus/.local/lib/python2.7/site-packages/arrow/arrow.py", line 19, in <module>
    from arrow import util, locales, parser, formatter
  File "/home/matheus/.local/lib/python2.7/site-packages/arrow/parser.py", line 12, in <module>
    from backports.functools_lru_cache import lru_cache  # pragma: no cover
ImportError: No module named functools_lru_cache
$ python --version 
Python 2.7.14
$ pip show arrow
Name: arrow
Version: 0.12.1
$ pip show backports.functools_lru_cache
Name: backports.functools-lru-cache
Version: 1.5
$ pip --version
pip 9.0.3
@mscansian
Copy link
Author

Probably a duplicate of #495

@anishsane
Copy link

I stumbled upon this problem on a raspberry-pi+kodi setup.
pip install was giving me problems. (I might have messed up because of python 2.7 and python 3 pip install attempts)

Finally, this option worked correctly:
apt-get install python-backports.functools-lru-cache
(Adding it in case anybody benefits from this comment.)

@jadchaar
Copy link
Member

Thanks for sharing @anishsane. This is an elusive issue that we are not able to nail down. We talked with the creator of the lru cache backport (who also happens to also be a maintainer of setuptools) and he was unable to figure out the fundamental problem as well. Glad you found a workaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants