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
問題解決。
未報錯