ideoforms / pylive

Query and control Ableton Live from Python
505 stars 66 forks source link

Is Python 3 supported? #16

Closed tom-f-oconnell closed 3 years ago

tom-f-oconnell commented 4 years ago

In the requirements listed in the README, the Python required is listed as "2.6+". I just want to clarify whether or not this is intended to include Python 3. From looking at some of the code, it looks like it does NOT include Python 3. A minor edit to the README to say it also works on Python 3 would be appreciated if it actually is expected to work there.

If I'm correct that Python 3 is not supported, is there any plan to change this? Is something on the Ableton side of things preventing that, or is it more a matter of the work required to add Python 3 support?

Edit: I see that some of the examples were changed to have Python 3 in their shebang line, so maybe this is a work in progress? The first file I looked at was actually in your LiveOSC fork (the logging server), so I might have just assumed incorrectly. It was that plus that fact that all of my setup.py tests seem to be failing for pylive, but maybe that is actually a matter of me incorrectly installing pylive or its dependencies...

iTerentius commented 4 years ago

I am also wondering about this. I updated my Python to 3.x and now get this error (not sure if related):

`ERROR: Command errored out with exit status 1: command: /usr/local/opt/python/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/42/99ttvyfj43x5bhdtj0f_0qlw0000gq/T/pip-install-gjwwzd8e/pyliblo/setup.py'"'"'; file='"'"'/private/var/folders/42/99ttvyfj43x5bhdtj0f_0qlw0000gq/T/pip-install-gjwwzd8e/pyliblo/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/42/99ttvyfj43x5bhdtj0f_0qlw0000gq/T/pip-install-gjwwzd8e/pyliblo/pip-egg-info cwd: /private/var/folders/42/99ttvyfj43x5bhdtj0f_0qlw0000gq/T/pip-install-gjwwzd8e/pyliblo/ Complete output (5 lines): Traceback (most recent call last): File "", line 1, in File "/private/var/folders/42/99ttvyfj43x5bhdtj0f_0qlw0000gq/T/pip-install-gjwwzd8e/pyliblo/setup.py", line 20, in from Cython.Distutils import build_ext ModuleNotFoundError: No module named 'Cython'

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. `

iTerentius commented 4 years ago

And I have install the latest Cython via Homebrew. Same issue.

ideoforms commented 4 years ago

Python 3 is absolutely supported, but I think this is an issue with the way that setuptools handles Cython as a dependency - reported as an unresolved issue.

I've reproduced it here. It seems like Cython needs to be installed before the setuptools script is run, and then the install should proceed successfully. So do pip3 install cython, then try to install pylive again, and everything should proceed OK.

However, this isn't really a satisfactory fix! I'll look at implementing something that solves the issue properly.

iTerentius commented 4 years ago

Okay, that worked! Thanks. My mistake was installing Cython from homebrew instead of pip3. I appreciate your help!