关于 pymc3、arviz 和 theano 包的稳定版本是什么?
what is stable release version with regards to pymc3, arviz and theano packages?
我正在使用 Spyder IDE 和 python 版本 3.8.5,我正在使用 pymc3(不记得确切的版本)并且它在升级后工作正常 scipy、spyder 和 python,一切都乱套了。我花了最后 2 天时间试图解决这个问题,每次我安装 pymc3 和 运行 程序时,要么我得到关于 theano 和 cxx__flag 的错误,要么 arviz 没有 geweke 的属性,或者然后它收到关于 'plots'.
的错误
谁能告诉我 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}))')
好吧,我所做的是以下几行并设法解决了我的问题:
- 我卸载并安装了 Anaconda
- 更新了 conda 和 anaconda
- 使用
conda install -c conda-forge pymc3
安装 Pymc3,同时保持相同版本的 numpy、scipy 和 theano(因为我更新 numpy 和 scipy 的那一刻,它往往会导致与文件不一致对于 Pymc3)
- 我用这一行来安装 theano-pymc
conda install -c conda-forge theano-pymc
我正在使用 Spyder IDE 和 python 版本 3.8.5,我正在使用 pymc3(不记得确切的版本)并且它在升级后工作正常 scipy、spyder 和 python,一切都乱套了。我花了最后 2 天时间试图解决这个问题,每次我安装 pymc3 和 运行 程序时,要么我得到关于 theano 和 cxx__flag 的错误,要么 arviz 没有 geweke 的属性,或者然后它收到关于 'plots'.
的错误谁能告诉我 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}))')
好吧,我所做的是以下几行并设法解决了我的问题:
- 我卸载并安装了 Anaconda
- 更新了 conda 和 anaconda
- 使用
conda install -c conda-forge pymc3
安装 Pymc3,同时保持相同版本的 numpy、scipy 和 theano(因为我更新 numpy 和 scipy 的那一刻,它往往会导致与文件不一致对于 Pymc3) - 我用这一行来安装 theano-pymc
conda install -c conda-forge theano-pymc