ImportError: Version check of the existing lazylinker compiled file.
See original GitHub issueI wasn’t able to import the package
Code:
from bambi import Model
Returns:
You can find the C code in this temporary file:
C:\Users\liqia\AppData\Local\Temp\theano_compilation_error_09r_4ho5
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
~\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py in
80 version,
---> 81 actual_version, force_compile, _need_reload))
82 except ImportError:
ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
~\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py in
104 version,
--> 105 actual_version, force_compile, _need_reload))
106 except ImportError:
ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True
During handling of the above exception, another exception occurred:
Exception Traceback (most recent call last)
~\Anaconda3\lib\site-packages\theano\gof\vm.py in
673 raise theano.gof.cmodule.MissingGXX('lazylinker will not be imported if theano.config.cxx is not set.')
--> 674 from . import lazylinker_c
675
~\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py in
139 cmodule.GCC_compiler.compile_str(dirname, code, location=loc,
--> 140 preargs=args)
141 # Save version into the __init__.py file.
~\Anaconda3\lib\site-packages\theano\gof\cmodule.py in compile_str(module_name, src_code, location, include_dirs, lib_dirs, libs, preargs, py_module, hide_symbols)
2395 raise Exception('Compilation failed (return status=%s): %s' %
-> 2396 (status, compile_stderr.replace('\n', '. ')))
2397 elif config.cmodule.compilation_warning and compile_stderr:
Exception: Compilation failed (return status=1): C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o: In function `_import_array':
. C:/Users/liqia/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1475: undefined reference to `__imp_PyExc_AttributeError'
. C:/Users/liqia/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1480: undefined reference to `__imp_PyCapsule_Type'
. C:/Users/liqia/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1481: undefined reference to `__imp_PyExc_RuntimeError'
. C:/Users/liqia/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1496: undefined reference to `__imp_PyExc_RuntimeError'
. C:/Users/liqia/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1504: undefined reference to `__imp_PyExc_RuntimeError'
. C:/Users/liqia/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1510: undefined reference to `__imp_PyExc_RuntimeError'
. C:/Users/liqia/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1520: undefined reference to `__imp_PyExc_RuntimeError'
. C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o:C:/Users/liqia/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1532: more undefined references to `__imp_PyExc_RuntimeError' follow
. C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o: In function `NpyCapsule_Check':
. C:/Users/liqia/Anaconda3/lib/site-packages/numpy/core/include/numpy/npy_3kcompat.h:535: undefined reference to `__imp_PyCapsule_Type'
. C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o: In function `unpack_list_of_ssize_t':
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:48: undefined reference to `__imp_PyExc_TypeError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:58: undefined reference to `__imp_PyExc_IndexError'
. C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o: In function `CLazyLinker_init':
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:352: undefined reference to `__imp_PyExc_IndexError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:370: undefined reference to `__imp_PyExc_IndexError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:385: undefined reference to `__imp_PyExc_IndexError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:389: undefined reference to `__imp_PyExc_IndexError'
. C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o:C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:393: more undefined references to `__imp_PyExc_IndexError' follow
. C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o: In function `CLazyLinker_init':
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:405: undefined reference to `__imp_PyExc_TypeError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:420: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:426: undefined reference to `__imp_PyExc_IndexError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:440: undefined reference to `__imp_PyExc_TypeError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:444: undefined reference to `__imp__Py_NoneStruct'
. C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o: In function `c_call':
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:545: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:545: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:545: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:546: undefined reference to `__imp__Py_NoneStruct'
. C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o:C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:546: more undefined references to `__imp__Py_NoneStruct' follow
. C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o: In function `lazy_rec_eval':
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:618: undefined reference to `__imp_PyExc_IndexError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:641: undefined reference to `__imp_PyExc_TypeError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:649: undefined reference to `__imp_PyExc_ValueError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:657: undefined reference to `__imp_PyExc_IndexError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:708: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:715: undefined reference to `__imp_PyExc_TypeError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:721: undefined reference to `__imp_PyExc_TypeError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:771: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:771: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:772: undefined reference to `__imp__Py_NoneStruct'
. C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o: In function `CLazyLinker_call':
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:814: undefined reference to `__imp_PyExc_RuntimeError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:826: undefined reference to `__imp_PyExc_RuntimeError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:839: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:839: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:840: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:849: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:849: undefined reference to `__imp__Py_NoneStruct'
. C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o:C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:850: more undefined references to `__imp__Py_NoneStruct' follow
. C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o: In function `CLazyLinker_call':
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:894: undefined reference to `__imp_PyExc_AssertionError'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:937: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:937: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:938: undefined reference to `__imp__Py_NoneStruct'
. C:\Users\liqia\AppData\Local\Temp\ccEOvooB.o: In function `CLazyLinker_set_allow_gc':
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:973: undefined reference to `__imp_PyBool_Type'
. C:/Users/liqia/AppData/Local/Theano/compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.3-64/lazylinker_ext/mod.cpp:976: undefined reference to `__imp__Py_TrueStruct'
. collect2.exe: error: ld returned 1 exit status
.
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
in
----> 1 from bambi import Model
~\Anaconda3\lib\site-packages\bambi\__init__.py in
----> 1 from .models import Model
2 from .priors import Prior, Family
3 from .results import ModelResults
4 from .backends import StanBackEnd, PyMC3BackEnd
5 from .version import __version__
~\Anaconda3\lib\site-packages\bambi\models.py in
12 from bambi.priors import PriorFactory, PriorScaler, Prior
13 from bambi.utils import listify
---> 14 import pymc3 as pm
15
16
~\Anaconda3\lib\site-packages\pymc3\__init__.py in
3
4 from .blocking import *
----> 5 from .distributions import *
6 from .glm import *
7 from . import gp
~\Anaconda3\lib\site-packages\pymc3\distributions\__init__.py in
----> 1 from . import timeseries
2 from . import transforms
3
4 from .continuous import Uniform
5 from .continuous import Flat
~\Anaconda3\lib\site-packages\pymc3\distributions\timeseries.py in
----> 1 import theano.tensor as tt
2 from theano import scan
3
4 from pymc3.util import get_variable_name
5 from .continuous import get_tau_sigma, Normal, Flat
~\Anaconda3\lib\site-packages\theano\__init__.py in
108 object2, utils)
109
--> 110 from theano.compile import (
111 SymbolicInput, In,
112 SymbolicOutput, Out,
~\Anaconda3\lib\site-packages\theano\compile\__init__.py in
10 from theano.compile.function_module import *
11
---> 12 from theano.compile.mode import *
13
14 from theano.compile.io import *
~\Anaconda3\lib\site-packages\theano\compile\mode.py in
9 import theano
10 from theano import gof
---> 11 import theano.gof.vm
12 from theano import config
13 from six import string_types
~\Anaconda3\lib\site-packages\theano\gof\vm.py in
681 except ImportError:
682 pass
--> 683 except (OSError, theano.gof.cmodule.MissingGXX) as e:
684 # OSError happens when g++ is not installed. In that case, we
685 # already changed the default linker to something else then CVM.
AttributeError: module 'theano' has no attribute 'gof'
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
Version check of the existing lazylinker compiled file. Looking ...
Same problem here, solved by installing a mingw-w64 import library for python(on Windows via conda) in your CLI type:
Read more >pymc3 importerror: version check of the existing lazylinker ...
pymc3 importerror: version check of the existing lazylinker compiled file. My calculations using PyMC3 fail after pushing my operators to Google Cloud ...
Read more >PyMC3 installation issue - Questions - PyMC Discourse
ImportError : Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None.
Read more >users\] Theano Compile error with Anaconda, OSX
... _need_reload)) > > ImportError: Version check of the existing lazylinker compiled file. Looking > for version 0.211, but found None.
Read more >MCMC using PyMC3 for Stochastic Volatility with Leverage
... _need_reload)) 82 except ImportError: ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I have some guesses - first I would try uninstalling (
pip uninstall theano), and then let pymc3 specify the version (pip install --upgrade pymc3). You could also tryconda uninstall theano, thenconda install -c conda-forge pymc3if you are using conda.I tried
conda install -c anaconda libpythonIt seems works.My vscode no longer works due to https://github.com/Microsoft/vscode-python/issues/5258 after I installed everything from
conda forge. I will try and see ifconda installwill give me any issues.