Python安装fbprophet包

最初在notebook中想运行这样一段代码
from fbprophet import Prophet
但是遇到了非常多错误(最后是使用的conda下载的fbprophet 包,不清楚我前面升级的pip到底有没有帮助,可以直接从pystan库开始尝试)

首先,pip版本需要是最新版20.3.1

在线更新pip
python -m pip install --upgrade pip
强制升级是,python -m pip install -U --force-reinstall pip

如果是把pip卸载pip uninstall pip
pip再次安装:
离线下载pip安装包
在这个链接里下载.gz形式的安装包,https://pypi.org/project/pip/#files
下载完成后解压,解压后有个setup.py文件,在命令行里进入这个文件所在的文件夹,然后执行这个文件,python setup.py install
如果下载的是.whl文件版本,安装方式也是在当前目录下运行 :pip install xxx.whl
在线安装pip install xx
如果网络不好可以使用国内镜像,pip install xx -i http://xxx
国内的几个常用镜像地址:
豆瓣 : https://pypi.douban.com/simple
中国科学科技大学 : https://mirrors.ustc.edu.cn/pypi/web/simple/
清华大学 :https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/

遇到的错误:
错误:
no module named pip._internal.cli.ma
解决办法:
重装pip

如果wheel报错
pip install wheel

错误:
failed building wheel for fbprophet
解决办法:
这个库依赖于pystan库,必须先安装pystan
pip install pystan
(我没有创建虚拟环境,也没有给pystan装c++环境)

我看有个博主使用conda安装fbprophet成功了,我也就这么装的,成功
conda install fbprophet -c conda-forge
如果有下载一堆看起来不相干的包,那就是成功的界面

使用conda的时候可能会遇到以下错误
错误:
An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way.
原因是conda源加入了不知名的URL,现在不能使用了(或者废弃)
解决办法:
添加清华源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/

conda config --set show_channel_urls yes

第一次试着在notebook里调用的时候报了错
ERROR:
fbprophet:Importing plotly failed. Interactive plots will not work.
解决方法:
conda install plotly -y
第二次试着调用就成功了,成功界面
此处有一个成功界面的图片

pyGUI的安装地址
https://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/

  • 1
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值