alkaline-ml / pmdarima

A statistical library designed to fill the void in Python's time series analysis capabilities, including the equivalent of R's auto.arima function.
https://www.alkaline-ml.com/pmdarima
MIT License
1.55k stars 228 forks source link

How can I get the current version working within Anaconda Jupyter? #218

Closed chivalry closed 4 years ago

chivalry commented 4 years ago

Question Do you have any advice for installing pmdarima under Anaconda and Jupyter? I'm somewhat new to those environments and the one solid answer installed an older version. I then tried setting up my own Anaconda package, but that's erroring out when I try to install it. I finally tried installing from your GitHub repository, but that's also erroring out.

Versions (if necessary) From within my Jupyter notebook:

Darwin-19.0.0-x86_64-i386-64bit Python 3.7.4 (default, Aug 13 2019, 15:17:50) [Clang 4.0.1 (tags/RELEASE_401/final)] pmdarima 1.2.0 NumPy 1.17.2 SciPy 1.3.1 Scikit-Learn 0.21.3 Statsmodels 0.10.1

tgsmith61591 commented 4 years ago

This is kind of a multi-part answer, but there's an easy solution. First of all, in #174 we're working on getting a Conda package deployed when we release. We have no affiliation with Saravji so I think he's just repackaged our code to host on Conda, which is fine, but take care when downloading it, since I can't vouch for what's in the tarball.

Getting it working in conda (which is what most of us use when developing) is pretty straight forward:

$ conda create -n pmdarima-example -q python=3.7
$ conda activate pmdarima-example
$ pip install pmdarima

To allow jupyter to find and select your env, you'll need nb_conda, as suggested in this answer on SO:

$ conda install nb_conda jupyter

Then when you start your notebook, your environment should appear in the Kernel > Change Kernel tab:

Screen Shot 2019-11-14 at 4 53 46 PM

Select it, then try importing:

Screen Shot 2019-11-14 at 4 54 53 PM
chivalry commented 4 years ago

Thanks so much. That worked great. I really appreciate the help. Now I can follow through on your Use cases in the documentation.

BTW, I also really appreciate the Tips to using auto_arima docs. I'm a programmer first, but have been asked to analyse sales for projections, and that one page made so many things click that three or four classes on time series forecasting hadn't.

tgsmith61591 commented 4 years ago

I'm glad to hear it! Thanks for finding and fixing issues as you see them.