Installation — statsmodels 0.9.0 documentation | Statsmodels Python install

Installation¶. Using setuptools¶. To obtain the latest released version of statsmodels using pip. pip install -U statsmodels. Or follow ...Navigationindexmodules|next|previous|Install | Support | Bugs | Develop | Examples | FAQ | Installation¶Usingsetuptools¶Toobtainthelatestreleasedversionofstatsmodelsusingpippipinstall-UstatsmodelsOrfollowthislinktoourPyPIpage,downloadthewheelorsourceandinstall.StatsmodelsisalsoavailableinthroughcondaprovidedbyAnaconda.Thelatestreleasecanbeinstalledusingcondainstall-cconda-forgestatsmodelsObtainingtheSource¶Wedonotreleaseveryoftenbutthemasterbranchofoursourcecodeisusuallyfineforeverydayuse.Youcangetthelatestsourcefromourgithubrepository.Orifyouhavegitinstalled:gitclonegit://github.com/statsmodels/statsmodels.gitIfyouwanttokeepuptodatewiththesourceongithubjustperiodicallydo:gitpullinthestatsmodelsdirectory.InstallationfromSource¶YouwillneedaCcompilerinstalledtobuildstatsmodels.Ifyouarebuildingfromthegithubsourceandnotasourcerelease,thenyouwillalsoneedCython.YoucanfollowtheinstructionsbelowtogetaCcompilersetupforWindows.Linux¶Onceyouhaveobtainedthesource,youcando(withappropriatepermissions):pythonsetup.pyinstallOr:pythonsetup.pybuildpythonsetup.pyinstallWindows¶Itisstronglyrecommendedtouse64-bitPythonifpossible.Python2.7¶ObtainMicrosoftVisualC++CompilerforPython2.7andtheninstallusingpythonsetup.pyinstallPython3.5¶DownloadandinstallthemostrecentversionofVisualStudioCommunityEditionandtheninstallusingpythonsetup.pyinstall32-bitorotherversionsofPython¶Youcanbuild32-bitversionofthecodeonwindowsusingmingw32.First,getandinstallmingw32.Then,you’llneedtoeditdistutils.cfg.ThisisusuallyfoundsomewherelikeC:Python27Libdistutilsdistutils.cfg.Addtheselines:[build]compiler=mingw32Theninthestatsmodelsdirectorydo:pythonsetup.pybuildpythonsetup.pyinstallORYoucanbuild32-bitMicrosoftSDK.DetailedinstructionscanbefoundontheCythonwikihere.Thegistoftheseinstructionsfollow.YouwillneedtodownloadthefreeWindowsSDKC/C++compilerfromMicrosoft.YoumustusetheMicroso


常見投資理財問答


延伸文章資訊