Reputation: 360
I want to use different models from the python library statsmodels (e.g. Arima and AR). However, I am not allowed to install Cython on my computer. Is there a way to use statsmodels without cython? I am using Python 2.7 and according to their website it should be possible for older version, but they lack to specify it further.
Upvotes: 0
Views: 236
Reputation: 22897
Cython is only needed to generate the C-files.
Either using a binary or a source (sdist) distribution does not require cython anymore. An sdist
includes the C-files generated by cython, and needs a C compiler but not cython.
It is possible to use parts of statsmodels without the C-extension, but that is just because some modules that are pure Python can be imported without importing also modules that depend on extension code. However, time series models like ARIMA or the statespace models make heavy use of Cython/C extensions and will not work without the compiled extensions.
Upvotes: 1
Reputation: 11338
According to their website, no if you use Python 3.4+.
From statsmodels site -> requirements:
Dependencies
statsmodels 0.8 was tested with the following minimal version requirements. However, some features require more recent versions.
Python >= 2.6, including Python 3.x .. ..
Cython >= 0.24 is required to build the code from github but not from a source distribution. Earlier versions may work, although you must use Cython >= 0.20.1 if you’re on Python 3.4.
I'm not sure what they mean by source distribution, but if you use Python version earlier to 3.4 maybe there is a way to compile it without Cython.
Upvotes: 0