jaraco / irc

Full-featured Python IRC library for Python.
MIT License
392 stars 86 forks source link

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

Closed jaraco closed 8 years ago

jaraco commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

see answer 1


Original comment by: steven meier