gitstats icon indicating copy to clipboard operation
gitstats copied to clipboard

Unable to install gitstats on macOS

Open leonardoraele opened this issue 3 years ago • 2 comments

Folloing instructions from http://gitstats.sourceforge.net/, I tried to install gitstats with command

brew install --HEAD homebrew/head-only/gitstats

But got this error:

Error: homebrew/head-only was deprecated. This tap is now empty and all its contents were either deleted or migrated.
Related issue: https://github.com/hoxu/gitstats/issues/55

leonardoraele avatar Dec 02 '21 14:12 leonardoraele

Indeed, Homebrew won't help you here, since Python 2 is deprecated, see:

  • https://www.python.org/doc/sunset-python-2/
  • https://docs.brew.sh/Homebrew-and-Python

On a recent version of macOS, you will need to:

  • download latest version of Python 2 from https://www.python.org/downloads/release/python-2718/ – and install
  • install gnuplot, e.g. using brew install gnuplot (have not tested this yet, there may be incompatibilities, since gitstats is a bit outdated)

znerd avatar Apr 09 '22 11:04 znerd

The installation provided by brew is outdated, so it is recommended to install it locally and then install the relevant dependencies.

  1. git clone [email protected]:hoxu/gitstats.git
  2. brew install gnuplot
  3. Install Python (>= 2.6.0)

After the above is completed, execute:

$ ./gitstats /mnt/src/git/project ~/public_html/project
(go grab a cup of coffee if it's a large project :)
$ sensible-browser ~/public_html/project/index.html

Have a good time ~

rich1e avatar Jan 05 '24 03:01 rich1e