anaconda/spyder安装pymc3.8后WARNING (theano.configdefaults): g++ not available解决办法

在官网上下载pymc3.8的镜像文件后用pip install命令进行安装,安装后调用pymc3出现如下警告:

>>> import pymc3
WARNING (theano.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`

Warning (from warnings module):
  File "D:\anaconda3\lib\site-packages\theano\configdefaults.py", line 560
    warnings.warn("DeprecationWarning: there is no c++ compiler."
UserWarning: DeprecationWarning: there is no c++ compiler.This is deprecated and with Theano 0.11 a c++ compiler will be mandatory
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.

原因在于电脑缺少c++编译环境
很明显,我们需要在cmd中通过命令conda install m2w64-toolchain进行相关的编译程序的安装(大概100多M)

也可以不安装c++编译环境,可以把Theano的标志cxx设置为空,来消除以上警告

虽然安装时间有点长,但安装c++环境相关程序后,它们会把pymc3重新根据你的CPU、GPU编译优化一遍,这个好处还是挺大的(相对来说机器学习也比较吃硬件叭)

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值