No support for Python3.
No plans for adding it in the closest future, but we will do it later at some point.
OK thanks.
Any updates on this? Essentia is the last package in my stack that doesn't support Python 3.
We'll be working on that soon.
Is this still the case?
No, as far as I can see (build aborted as stated in #506).
Most data science, math, etc libs are now compatible with python 3. It's a real shame that we have to revert to python 2 to use essentia via the bindings.
I am aware that it takes work, and I'm incredibly appreciative of what you've done so far :-).
On a best guess basis, when are you planning to update the python bindings ?
Essentia uses no helper tools to build its python bindings. As a result, we have a lot of custom code written by a developer who is no longer at MTG. I've had a look at doing the porting, but the job is large (the above link gives an idea of the amount of work involved, and we'll have to support both python 2 and 3 for some time into the future). We're only a few developers with other responsibilities as well.
Believe me, we all want python 3 support too, and it's on our list to support as soon as possible, but we probably can't give a more concrete timeframe than "as soon as we can"
Hej @dbogdanov,
I鈥檝e noticed some recent commits related to the Python 3 bindings. Could you please tell, what鈥檚 the status of this feature? Can I already try to compile the master branch to get these bindings?
Thanks!
@ech2 Python3 bindings are already in the master branch, you can start using them.
There are few fixes still going on in the python3-fixes branch to be merged later. Those fixes are related to refactoring all python examples code and fixing unit tests for Python 3.
Is the option "--python=/usr/local/bin/python3" enough to install in python 3? (keeping python 2 essentia version)
Correct, this should work
Hi again!
I was able to compile and install it on the Arch-based distro (Manjaro), although with some problems. Particularly, I needed the following patch to apply to the wscript
:
diff --git a/wscript b/wscript
index fb43390a..c71b4969 100644
--- a/wscript
+++ b/wscript
@@ -281,8 +281,8 @@ def build(ctx):
if ctx.env.WITH_CPPTESTS:
# missing -lpthread flag on Ubuntu and LinuxMint
- if platform.dist()[0].lower() in ['debian', 'ubuntu', 'linuxmint'] and not ctx.env.CROSS_COMPILE_MINGW32 and not ctx.env.WITH_STATIC_EXAMPLES:
- ext_paths = ['/usr/lib/i386-linux-gnu', '/usr/lib/x86_64-linux-gnu']
+ if not ctx.env.CROSS_COMPILE_MINGW32 and not ctx.env.WITH_STATIC_EXAMPLES:
+ ext_paths = ['/usr/lib32', '/usr/lib']
ctx.read_shlib('pthread', paths=ext_paths)
ctx.env.USES += ' pthread'
Aparently on Arch platform.dist()
returns an empty tuple:
In [1]: import platform; platform.dist()
Out[1]: ('', '', '')
And I鈥檝e uploaded a build script to install on Arch: https://aur.archlinux.org/packages/essentia-git/
@ech2 Does platform.linux_distribution()
return an empty tuple too?
@dbogdanov Nope, works fine:
In [3]: platform.linux_distribution()
Out[3]: ('arch', 'Manjaro', 'Linux')
Both platform.dist()
and platform.linux_distribution()
are depricated and are expected to be removed in Python 3.7. We'll have to use the distro PyPI package if we want to continue to use them.
@ech2 After 6bdfc204b096072b3aabd1937497c9ed0bba2b5f, it should work now without a fix.
Hi
I read previous discussion in this thread. I guess that installing with python3 binding is supported.
But when configure for compiling, it turns out "essentia does not support python3 yet"
The results of failed configuration:
I had followed the instructions Installing dependencies on Mac OS X and compiling-essentia
I also try out "--python=" pointing to my python path in virtual environment
My Environment
Do anyone know what is this problem and how to solve it?
Not sure what MTG will say but I installed and configure waf
as per instructions except I used python3
. I then copied waf
to the essentia
folder. When you build using python3 waf
it creates and uses a different hidden folder with all your waflib
options. I believe MTG's only issue, besides user testing, with my fork is that my waf
is different from theirs.
@sildeag Thank you, I will try out your suggestions.
But first thing is that I need to understand what's inside ./waf. I should do some research on related issues.
Python2 will not be maintained until 2020. This will make Essentia python3 binding compiling issue become unavoidable task in near future.
@ykhorzon the v2.1_beta4 release does not have support for python 3. Please use master.
Thank you! It works!
+1 to move everything to Python3!!!
You can use Essentia docker image. It has python 3.5 binding version.
https://github.com/MTG/essentia-docker
Most helpful comment
Any updates on this? Essentia is the last package in my stack that doesn't support Python 3.