Closed fboender closed 8 years ago
Just noticed the "setuptools_scm functionality is degraded" message. It's probably related to that. I have no idea what's causing that. I'll investigate further.
The problem is indeed related to old setuptools version. This particular virtualenv was ran on Ubuntu 14.04. To fix the issue, upgrade the version of pip, wheel and setuptools in your virtualenv:
pip install -U pip wheel setuptools
Afterwards, reinstall irc:
pip install irc
Now it works:
>>> import irc.bot
>>>
See also the explanation in #66. I think I'll update the setup script to include that dependency when setuptools is old.
Digging just a bit further, it seems that the declared dependency is in jaraco.functools, but more importantly, the issue lies with pip, which can't even be detected for wheel-based installs, so I think the best that could be done is to advertise the issue (which is done by this ticket and the sister ticket), to recommend that everyone upgrade their packaging tools.
I'll also mention that this issue only affects Python 2, so switching to Python 3 also corrects the issue.
Another point in favour of Python 3. :-)
Hi, doing that didn't work on a Ubuntu 15.04 x64 VPS, I needed to pip install functools32
and to modify the import line functools ---> functools32
to get it working.
Hi @Xenthys. I'd recommend instead simply pip install backports.functools_lru_cache
. That's the import that's missed when irc
(or jaraco.functools
) is installed by Setuptools < 0.7 or Pip < 6.0.
As I mentioned above, I was considering updating the setup script to detect when being installed by an old version of setuptools, but I realized that older pip is a much more common scenario and as far as I know, there's no way to hook into pip during an install to check that it is new enough to support the environment marked dependencies.
However, to be more lenient, I've released a new functools 1.8 with more generous handling of a missing lru_cache
module, which also bypasses this issue.
Good, thanks for your reply!
When installing irclib in a virtualenv through Pip, I receive a an error when trying to import "irc.bot" and "irc.client". Full transcription: