btproxy
btproxy copied to clipboard
undefined symbol: Py_InitModule
when running, whatever the case
Traceback (most recent call last):
File "/usr/bin/btproxy", line 4, in <module>
__import__('pkg_resources').run_script('btproxy==0.1', 'btproxy')
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 661, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1441, in run_script
exec(code, namespace, namespace)
File "/usr/lib/python3.7/site-packages/btproxy-0.1-py3.7-linux-x86_64.egg/EGG-INFO/scripts/btproxy", line 4, in <module>
from libbtproxy.argparser import args,parser
File "/usr/lib/python3.7/site-packages/btproxy-0.1-py3.7-linux-x86_64.egg/libbtproxy/__init__.py", line 3, in <module>
import clone
ImportError: /usr/lib/python3.7/site-packages/btproxy-0.1-py3.7-linux-x86_64.egg/clone.cpython-37m-x86_64-linux-gnu.so: undefined symbol: Py_InitModule
it seems this is a python 3 support issue. I encounter this problem with cosim flow (python driver) but not with simulation
I encountered this issue with python 3.8. Anyone have a solution to build btproxy?
I encountered this issue with python 3.8. Anyone have a solution to build btproxy?
Replacing https://github.com/conorpp/btproxy/blob/master/lib/btproxy_clone.c#L118 with
#if PY_MAJOR_VERSION >= 3at least makesbtproxyrun on my machine
If you don't want to edit the c file, you can also define a macro in btproxy/setup.py
git clone https://github.com/conorpp/btproxy
sed -i "12a\ \ \ \ define_macros=[('PYTHON34', 'true')]," btproxy/setup.py
cd btproxy
sudo python3 setup.py install