Appendix. Installation instructions

Installing Anaconda

The code in this book was run on a Windows 10 computer using Jupyter Notebooks with Anaconda. I highly recommend using Anaconda, especially if you are on a Windows machine, as it automatically installs Python and many libraries that we’ll use throughout the book, such as pandas, numpy, matplotlib, statsmodels, and others. You can install Anaconda’s individual edition, which is free, from their website (www.anaconda.com/products/individual). It comes with a graphical installer, making for an easy installation. Note that at the time of writing, Anaconda installs Python 3.9.

Python

If you follow the recommendation of using Anaconda, you will not need to install Python separately. If you do need to install Python separately, you can download it from the official website (www.python.org/downloads/). The code in this book used Python 3.7, but any later version of Python will also work.

Jupyter Notebooks

The code in this book was run on Jupyter Notebooks. This allows you to immediately see the output of your code, and it’s a great tool for learning and exploration. It also allows you to write text and display equations.

Assuming you installed Anaconda, Jupyter Notebook will also install on your machine. On Windows, you can press the Windows key and start typing Jupyter Notebook. You can then launch the application, which will open your browser. It will display a folder structure, and you can navigate to where you want to save your notebooks or where you cloned the GitHub repository containing the source code.

GitHub Repository

The entire source code for this book is available on GitHub: https://github.com/marcopeix/TimeSeriesForecastingInPython. At the root of the repository, there is a data folder that contains all the data files used throughout the entire book.

The repository is organized by chapter. Each folder contains a notebook that will run all the code and generate the figures for that specific chapter. You can also find the solutions to the exercises there. Provided that Git is installed, you can clone the repository and access it on your local machine:

git clone https://github.com/marcopeix/TimeSeriesForecastingInPython.git

If Git is not installed, you can download and install it from the Git website (https://git-scm.com/downloads). I then recommend those on Windows use Git Bash to run the preceding command.

Installing Prophet

In this book, we use the Prophet library, a popular forecasting library that automates most of the process. Windows users might have some trouble installing the library, even when using Anaconda.

To install the library, you can run the following commands at your Anaconda prompt:

conda install libpython m2w64-toolchain -c msys2
conda install numpy cython matplotlib scipy pandas -c conda-forge
conda install -c conda-forge pystan
conda install -c conda-forge fbprophet

Installing libraries in Anaconda

If at any time you need to install a particular library while using Anaconda, you can do a Google search: conda <package name>. The first result should lead you to the https://anaconda.org/conda-forge/<package name> website, where you will see a list of commands that will install the package. Usually, the first command will work, and it will have the format conda install -c conda-forge <package name>.

For example, to install TensorFlow 2.6 with Anaconda, you can run conda install -c conda-forge tensorflow at your Anaconda prompt.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.56.45