irccat / irccat2 fail to load backports.functools_lru_cache on jessie #66

Closed
jaraco opened this Issue Nov 20, 2015 · 3 comments

Projects

None yet

1 participant

@jaraco
Owner
jaraco commented Nov 20, 2015

hi,

ive installed "irc" with pip, but i had to download irc-13.1.tar.gz manually because the scripts/ directory was nowhere to be found.

steps to reproduce:
tar xzf irc-13.1.tar.gz && cd irc-13.1/scripts && python irccat.py

the error comes with python 2.7+, python 3 says wrong syntax

#!python

 python irccat2.py 
Traceback (most recent call last):
  File "irccat2.py", line 10, in <module>
    import irc.client
  File "/home/julius/.local/lib/python2.7/site-packages/irc/client.py", line 68, in <module>
    from jaraco.functools import Throttler
  File "/home/julius/.local/lib/python2.7/site-packages/jaraco/functools.py", line 9, in <module>
    from backports.functools_lru_cache import lru_cache
ImportError: No module named backports.functools_lru_cache

#!python

python irccat.py 
Traceback (most recent call last):
  File "irccat.py", line 14, in <module>
    import irc.client
  File "/home/julius/.local/lib/python2.7/site-packages/irc/client.py", line 68, in <module>
    from jaraco.functools import Throttler
  File "/home/julius/.local/lib/python2.7/site-packages/jaraco/functools.py", line 9, in <module>
    from backports.functools_lru_cache import lru_cache
ImportError: No module named backports.functools_lru_cache


@jaraco
Owner
jaraco commented Nov 20, 2015

The issue lies with how backports.functools_lru_cache is resolved as a dependency. The package is required conditionally on the Python version being 2.7. I suspect that the version of pip you have isn't honoring that dependency properly.

I just installed jaraco.functools with pip 7.1.2 and it installed backports.functools_lru_cache as required.

I suspect you either need to upgrade pip or install backports.functools_lru_cache manually (i.e. pip install backports.functools_lru_cache).

Let me know if that doesn't solve it.


Original comment by: Jason R. Coombs

@jaraco
Owner
jaraco commented Nov 20, 2015

Thanks very much, installing it manually solved it.
jessis's pip version is 1.5.7. however that came to be.


Original comment by: steven meier

@jaraco
Owner
jaraco commented Nov 20, 2015

see answer 1


Original comment by: steven meier

@jaraco jaraco closed this Nov 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment