我正在使用带有 python 版本 3.8.5 的 Spyder IDE,我使用的是 pymc3(不记得确切的版本),它工作正常,在升级 scipy、spyder 和 python 之后,一切都变得混乱了。我花了最后两天试图解决这个问题,每次我安装 pymc3 并运行程序时,要么我得到关于 theano 和 cxx__flag 的错误,要么是没有 geweke 属性的 arviz,或者它得到一个关于“情节”的错误'。
有人能告诉我什么是用于 pymc3、arviz、theano 和 theano-pymc 的稳定版本吗?
编辑1:
好吧,我设法通过在 spyder IDE 中将 python 升级到 3.8.10 来让它工作,然后我在 anaconda 终端中使用以下行卸载并重新安装了 pymc3 theano 和 arviz。
conda install -c conda-forge pymc3
但是,现在我在运行我的代码时收到此错误:
sd_0 = pm.Normal('sd_0', mu=0, sd=1)
File "D:\Anaconda\lib\site-packages\pymc3\distributions\distribution.py", line 121, in __new__
dist = cls.dist(*args, **kwargs)
File "D:\Anaconda\lib\site-packages\pymc3\distributions\distribution.py", line 130, in dist
dist.__init__(*args, **kwargs)
File "D:\Anaconda\lib\site-packages\pymc3\distributions\continuous.py", line 488, in __init__
self.variance = 1.0 / self.tau
File "D:\Anaconda\lib\site-packages\theano\tensor\var.py", line 176, in __rtruediv__
return theano.tensor.basic.true_div(other, self)
File "D:\Anaconda\lib\site-packages\theano\graph\op.py", line 253, in __call__
compute_test_value(node)
File "D:\Anaconda\lib\site-packages\theano\graph\op.py", line 126, in compute_test_value
thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
File "D:\Anaconda\lib\site-packages\theano\graph\op.py", line 634, in make_thunk
return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
File "D:\Anaconda\lib\site-packages\theano\graph\op.py", line 600, in make_c_thunk
outputs = cl.make_thunk(
File "D:\Anaconda\lib\site-packages\theano\link\c\basic.py", line 1203, in make_thunk
cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
File "D:\Anaconda\lib\site-packages\theano\link\c\basic.py", line 1138, in __compile__
thunk, module = self.cthunk_factory(
File "D:\Anaconda\lib\site-packages\theano\link\c\basic.py", line 1634, in cthunk_factory
module = get_module_cache().module_from_key(key=key, lnk=self)
File "D:\Anaconda\lib\site-packages\theano\link\c\cmodule.py", line 1191, in module_from_key
module = lnk.compile_cmodule(location)
File "D:\Anaconda\lib\site-packages\theano\link\c\basic.py", line 1543, in compile_cmodule
module = c_compiler.compile_str(
File "D:\Anaconda\lib\site-packages\theano\link\c\cmodule.py", line 2546, in compile_str
raise Exception(
Exception: ("Compilation failed (return status=1): C:\\Users\\----\\AppData\\Local\\Temp\\ccZOquFy.o: In function `run':\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:99: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:124: undefined reference to `__imp_PyExc_ValueError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:130: undefined reference to `__imp_PyExc_RuntimeError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:158: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:195: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:210: undefined reference to `__imp_PyExc_ValueError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:479: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:\\Users\\----\\AppData\\Local\\Temp\\ccZOquFy.o: In function `_Py_INCREF':\r. D:/Anaconda/include/object.h:459: undefined reference to `__imp__Py_NoneStruct'\r. C:\\Users\\----\\AppData\\Local\\Temp\\ccZOquFy.o: In function `run':\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:485: undefined reference to `__imp_PyExc_RuntimeError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:244: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:265: undefined reference to `__imp_PyExc_RuntimeError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:173: undefined reference to `__imp_PyExc_TypeError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:179: undefined reference to `__imp_PyExc_RuntimeError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:515: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:514: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:516: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:259: undefined reference to `__imp_PyExc_TypeError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:279: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:294: undefined reference to `__imp_PyExc_ValueError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:328: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:349: undefined reference to `__imp_PyExc_RuntimeError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:216: undefined reference to `__imp_PyExc_RuntimeError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:343: undefined reference to `__imp_PyExc_TypeError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:300: undefined reference to `__imp_PyExc_RuntimeError'\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:397: undefined reference to `__imp_PyExc_RuntimeError'\r. C:\\Users\\----\\AppData\\Local\\Temp\\ccZOquFy.o: In function `instantiate':\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:550: undefined reference to `__imp_PyExc_TypeError'\r. C:\\Users\\----\\AppData\\Local\\Temp\\ccZOquFy.o: In function `_import_array':\r. D:/Anaconda/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1480: undefined reference to `__imp_PyCapsule_Type'\r. D:/Anaconda/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1481: undefined reference to `__imp_PyExc_RuntimeError'\r. C:\\Users\\----\\AppData\\Local\\Temp\\ccZOquFy.o: In function `PyInit_m31975b6dadb59d49af3f2b36405378825884299512ee0ed9081be33fa591d30d':\r. C:/Users/----/AppData/Local/Theano/compiledir_Windows-10-10.0.19042-SP0-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-3.8.10-64/tmpalwsztr6/mod.cpp:583: undefined reference to `__imp_PyExc_ImportError'\r. C:\\Users\\----\\AppData\\Local\\Temp\\ccZOquFy.o: In function `_import_array':\r. D:/Anaconda/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1512: undefined reference to `__imp_PyExc_RuntimeError'\r. D:/Anaconda/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1496: undefined reference to `__imp_PyExc_RuntimeError'\r. D:/Anaconda/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1502: undefined reference to `__imp_PyExc_RuntimeError'\r. D:/Anaconda/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1524: undefined reference to `__imp_PyExc_RuntimeError'\r. D:/Anaconda/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1476: undefined reference to `__imp_PyExc_AttributeError'\r. D:/Anaconda/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1488: undefined reference to `__imp_PyExc_RuntimeError'\r. collect2.exe: error: ld returned 1 exit status\r. ", 'FunctionGraph(Elemwise{true_div,no_inplace}(TensorConstant{1.0}, TensorConstant{1.0}))')