nasirhjafri / libyear

A simple measure of software dependency freshness.
https://libyear.com/
131 stars 16 forks source link

ModuleNotFoundError: No module named 'distutils' #37

Open anentropic opened 4 months ago

anentropic commented 4 months ago
$ pipx install libyear
  installed package libyear 0.2.1, installed using Python 3.12.2
  These apps are now globally available
    - libyear
done! ✨ 🌟 ✨

$ libyear -r requirements-ci.txt
Traceback (most recent call last):
  File "/Users/anentropic/.local/bin/libyear", line 6, in <module>
    from libyear.pypi import get_lib_days, get_no_of_releases
  File "/Users/anentropic/.local/pipx/venvs/libyear/lib/python3.12/site-packages/libyear/pypi.py", line 1, in <module>
    from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'
PBorocz commented 3 months ago

FWIW in case anyone runs into this (as I just did):

$ pipx inject libyear setuptools

sam-atkins commented 3 months ago

I wanted to use this tool at work and encountered various errors. Also stale PRs so I used a work hackday to fork and update it. I wanted functionality to parse pyproject files without having to convert them to requirements.txt.

Anyway, my fork is here if anyone is interested https://github.com/sam-atkins/pylibyear

PBorocz commented 3 months ago

Thanks Sam! Your update for pyproject.toml removed a wrapper script I created just yesterday...and...

pipx install git+https://github.com/sam-atkins/pylibyear

Worked perfectly.