Maybe being more specific will help:
I have issues importing ctypes. Can anyone confirm they were able to do this? I was able to append paths before import so any other components required I can most likely work out. So far had a hell of a time trying to figure out threading, seems to be blocking (probably in defense of main live thread). Forking works, but what's the point, multiprocessing is fine but that's also a fork in a way, threading on another hand is slooooow for any new threads. It seems there is something "special" in a way live_python is allowing the threading to be spun up behind the scenes.
I'm currently using Live 10.1 (14th of May) which under hood has the following
Code: Select all
== sys.path
[
'/Dropbox/Code/isobar/isobar',
'/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/Python/lib',
'/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/Python/site-packages/raven-5.8.1-py2.7.egg',
'/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/Python/site-packages/setuptools-28.7.1-py2.7.egg',
'/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/Python/site-packages/decorator-3.3.2-py2.5.egg',
'/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/Python/site-packages/python',
'/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/Python/site-packages/abl.util-0.1.16-py2.7.egg',
'/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/Python/site-packages/abl.vpath-0.8.2-py2.7.egg',
'/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/Python/site-packages/multipledispatch-0.4.8-py2.7.egg',
'/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/Python/site-packages/pkg_resources',
'/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/Python/abl.live',
'/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/MIDI Remote Scripts/',
'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5'
]
== sys.builtin_module_names
('__builtin__', '__main__', '_ast', '_bisect', '_codecs', '_collections', '_csv', '_functools', '_heapq', '_hotshot',
'_io', '_json', '_locale', '_lsprof', '_md5', '_multibytecodec', '_random', '_scproxy', '_sha', '_sha256', '_sha512',
'_socket', '_sqlite3', '_sre', '_ssl', '_struct', '_symtable', '_warnings', '_weakref', 'array', 'binascii', 'cPickle',
'cStringIO', 'cmath', 'datetime', 'dl', 'errno', 'exceptions', 'fcntl', 'future_builtins', 'gc', 'grp', 'imp', 'itertools',
'marshal', 'math', 'mmap', 'operator', 'parser', 'posix', 'pwd', 'pyexpat', 'resource', 'select', 'signal', 'strop',
'sys', 'syslog', 'termios', 'thread', 'time', 'timing', 'unicodedata', 'xxsubtype', 'zipimport', 'zlib')
== platform.sys.version
2.7.12 (default, Mar 20 2019, 10:36:06) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)]
== sys.executable (show me python executable, obviously embedded)
/Applications/Ableton Live 10 Suite.app/Contents/MacOS/Live
so now having this out of the way back to ctypes
Code: Select all
2019-06-17T12:23:38.258958: info: RemoteScriptError: Traceback (most recent call last):
2019-06-17T12:23:38.258994: info: RemoteScriptError: File "<string>", line 1, in <module>
2019-06-17T12:23:38.259140: info: RemoteScriptError: File "/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/MIDI Remote Scripts/LiveQL/__init__.py", line 1, in <module>
2019-06-17T12:23:38.259226: info: RemoteScriptError:
2019-06-17T12:23:38.259246: info: RemoteScriptError: from liveql import LiveQL
2019-06-17T12:23:38.259268: info: RemoteScriptError: File "/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/MIDI Remote Scripts/LiveQL/liveql.py", line 2, in <module>
2019-06-17T12:23:38.259315: info: RemoteScriptError:
2019-06-17T12:23:38.259332: info: RemoteScriptError: import ctypes
2019-06-17T12:23:38.259355: info: RemoteScriptError: File "/Applications/Ableton Live 10 Suite.app/Contents/App-Resources/Python/lib/ctypes/__init__.py", line 7, in <module>
2019-06-17T12:23:38.259393: info: RemoteScriptError:
2019-06-17T12:23:38.259410: info: RemoteScriptError: from _ctypes import Union, Structure, Array
2019-06-17T12:23:38.259440: info: RemoteScriptError: ImportError
2019-06-17T12:23:38.259457: info: RemoteScriptError: :
2019-06-17T12:23:38.259479: info: RemoteScriptError: No module named _ctypes
2019-06-17T12:23:38.259494: info: RemoteScriptError:
Just an FYI, ctypes is importing fine outside of Live, tried adding lib paths to matched moduels inside main ableton structure and outside. If I could only get interpreter console maybe I would figure this out, but having to rely and starting/stoping ableton each time is killing me. Anyone worked with this here? Help!