WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! The installed Theano(-PyMC) version (1.0.5) does not match the PyMC3 requirements. It was imported from ['D:\\RJ\\Anoconda\\anoconda33\\lib\\site-packages\\theano'] For PyMC3 to work, a compatible Theano-PyMC backend version must be installed. See https://github.com/pymc-devs/pymc3/wiki for installation instructions. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_7500/589649374.py in <module> 2 import pandas as pd 3 import numpy as np ----> 4 import pymc3 as pm 5 import theano 6 from matplotlib import pyplot as plt D:\RJ\Anoconda\anoconda33\lib\site-packages\pymc3\__init__.py in <module> 77 78 _check_backend_version() ---> 79 __set_compiler_flags() 80 _hotfix_theano_printing() 81 D:\RJ\Anoconda\anoconda33\lib\site-packages\pymc3\__init__.py in __set_compiler_flags() 59 def __set_compiler_flags(): 60 # Workarounds for Theano compiler problems on various platforms ---> 61 current = theano.config.gcc__cxxflags 62 theano.config.gcc__cxxflags = f"{current} -Wno-c++11-narrowing" 63 AttributeError: 'TheanoConfigParser' object has no attribute 'gcc__cxxflags'
当出现这种报错时!也是挺常见的一种错误,此时要记住解决方案:
错因:theno是1.0.5版本的,其与pymc3不匹配,所以我们需要做一件事情。将theno卸载掉,同时安装theno-pymc 1.1.2版本的即可。
输入命令为:
1.pip uninstall theno
2.pip install theno-pymc
问题解决。
未报错