For a detailed explanation of this code take a look here.
$ python --version
# Python 3.7.1
$ pip --version
#pip 10.0.1
If you are missing any of those, follow the instructions for your operating system: Python and pip
$ pip install --user pipenv
If pipenv is not available in in your shell after the installation you might have to add it to your system PATH. Click here for instructions.
$ git clone https://github.com/Randyjp/python-linear-reg.git
$ cd python-linear-reg
$ pipenv install
$python battingstats.py