Symbol not found: __PyThreadState_Current
See original GitHub issueIn an attempt to run the Sycamore depth 12 example, I’ve run into the following exception:
Traceback (most recent call last):
File "test_cotengra.py", line 40, in <module>
info = tn.contract(all, optimize=opt, get='path-info', output_inds=[])
File "/Users/david/Develop/cotengra/tensor/lib/python3.7/site-packages/quimb/tensor/tensor_core.py", line 3141, in contract
return tensor_contract(*self, **opts)
File "/Users/david/Develop/cotengra/tensor/lib/python3.7/site-packages/quimb/tensor/tensor_core.py", line 315, in tensor_contract
path_info = get_contraction(eq, *ops, path=True, **contract_opts)
File "/Users/david/Develop/cotengra/tensor/lib/python3.7/site-packages/quimb/tensor/tensor_core.py", line 110, in get_contraction
return fn(eq, *shapes, **kwargs)
File "/Users/david/Develop/cotengra/tensor/lib/python3.7/site-packages/quimb/tensor/tensor_core.py", line 78, in _get_contract_path
return oe.contract_path(eq, *shapes, shapes=True, **kwargs)[1]
File "/Users/david/Develop/cotengra/tensor/lib/python3.7/site-packages/opt_einsum/contract.py", line 259, in contract_path
path = path_type(input_sets, output_set, dimension_dict, memory_arg)
File "/Users/david/Develop/cotengra/tensor/lib/python3.7/site-packages/cotengra/hyper.py", line 347, in __call__
for trial in trials:
File "/Users/david/Develop/cotengra/tensor/lib/python3.7/site-packages/tqdm/std.py", line 1129, in __iter__
for obj in iterable:
File "/Users/david/Develop/cotengra/tensor/lib/python3.7/site-packages/cotengra/hyper.py", line 312, in _gen_results_parallel
yield self.get_and_report_next_future()
File "/Users/david/Develop/cotengra/tensor/lib/python3.7/site-packages/cotengra/hyper.py", line 296, in get_and_report_next_future
trial = future.result()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py", line 425, in result
return self.__get_result()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
ImportError: dlopen(/Users/david/Develop/cotengra/tensor/lib/python3.7/site-packages/kahypar.cpython-37m-darwin.so, 2): Symbol not found: __PyThreadState_Current
Referenced from: /Users/david/Develop/cotengra/tensor/lib/python3.7/site-packages/kahypar.cpython-37m-darwin.so
Expected in: flat namespace
in /Users/david/Develop/cotengra/tensor/lib/python3.7/site-packages/kahypar.cpython-37m-darwin.so
Helpful info: OS: macOS Catalina $PYTHONPATH: /Users/david/Library/Python/3.7/lib/python
I’ve tried changing my environment variables and editing the CMake of kahypar such that
CC=clang
, CXX=clang++
and, as a sanity check, to CC=gcc
, CXX=g++
– taking care to uninstall and reinstall the kahypar python bindings with pip each time.
Any insight would be much appreciated.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
What does "Symbol not found / Expected in: flat namespace ...
It means the symbol wasn't found. · @immibis I think that gcc expected gcc code and it found clang code instead, and that...
Read more >Symbol not found error while importing tensorflow in M1 ...
Hello there, I have installed tensorflow in my M1 Macbook Pro using these commands in a conda environment: conda install -c apple tensorflow-deps ......
Read more >Cffi Module Built But Not Found On Import - ADocLib
This is about getting an ImportError about cffibackend.so with a message like Symbol not found: PyUnicodeUCS2AsASCIIString.This error occurs in Python 2.
Read more >osx/pvpython: Symbol not found: _PyObject_GenericGetAttr
On osx with conda (python 3.6/3.7/3.8), paraview Python modules are imported successfully while pvpython fails to run with the following ...
Read more >Symbol not found: _ffi_prep_closure on Apple Silicon with ...
python -VV Python 3.9.6 (default, Jul 12 2021, 18:23:45) [Clang 12.0.5 (clang-1205.0.22.9)] $ pip install bcrypt -U Collecting bcrypt Using ...
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 FreeTop 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
Top GitHub Comments
I also installed using
pypi
, I will try and separate the two and update with any progress to rule out building kahypar from sourceGlad you were able to get it fixed- thanks for keeping this issue updated!