在pycharm下,安装statsmodels,会出现需要vc++14.0的错误提示。
这时可以到网站
https://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud
下载statsmodels‑0.8.0‑cp36‑cp36m‑win_amd64.whl
 
注意将文件拷贝到pycharm的工程下pythone.exe目录
打开CMD窗口,切换到pycharm的工程下pythone.exe所在的目录
cd C:\Users\用户名\PycharmProjects\untitled\venv\Scripts>
然后用pip install statsmodel 命令进行安装。
 
注意一定要切换到pycharm的工程下的python.exe目录。否则会用path变量中,对应的python.exe进行安装。在pycharm工程文件中,还是找不到statsmodels包。
 
statsmodels 官网例子网址:http://www.statsmodels.org/stable/examples/index.html#the-examples
 
需要依赖的包:
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
  • NumPy >= 1.6
  • SciPy >= 0.11
  • Pandas >= 0.12
  • Patsy >= 0.2.1
  • 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
  • wheel(这个是安装whl文件需要的?)
posted on 2018-04-16 17:25  白沙河  阅读(1515)  评论(0编辑  收藏  举报