[aubio-user] Using aubio 0.4.0 from python (windows)

Paul Brossier piem at piem.org
Fri Jan 10 13:47:51 CET 2014


On 01/10/2014 06:55 AM, Aymeric Voxler wrote:
> Thanks a lot
>
> Slowly reaching the goal: I can now find the aubio module by adding
> "sys.path.append('C:\\aubio-git\\python\\build\\lib.win32-2.7')".

good. you could try './setup.py install' once you know the module
compiled correctly.

> Now I get the error "cannot import name fft" in "from aubio import
> fvec, fft, cvec" so it can import fvec, but not fft (nor cvec,
> pitch,...) Do you have any idea on this ?

no, that's very strange. fvec is defined in (lib/)aubio/__init__.py as
an alias to a numpy vector. it looks aubio/_aubio.pyd is empty, or not
loading. try erasing the python/gen and python/build directories, and
recompiling the module.

> Note: I don't know exactly how to deal with LD_LIBRARY_PATH on
> windows, so I tried to copy "build/src/libaubio-4.dll" in all
> folders and add it in Windows PATH, but nothing improved...

what makes you think it doesn't load?

on a side note, it is not very convenient to install the binary file in
more than one place. i guess you could just copy it once to
c:\windows\dll or some similar path.

best, Paul

> 2014/1/9 Paul Brossier <piem at piem.org <mailto:piem at piem.org>>
>
> On 08/01/2014 13:38, Aymeric Voxler wrote:
>
> Hi Paul
>
>
> Hi all,
>
> It seems that Gauthier Boaglio
> <http://stackoverflow.com/users/1715716/gauthier-boaglio
> <http://stackoverflow.com/users/1715716/gauthier-boaglio>>'s answer
>
> here
>
http://stackoverflow.com/questions/16737260/how-to-tell-distutils-to-use-gcc
>
>
>
>
>
>
>
>
>
>
<http://stackoverflow.com/questions/16737260/how-to-tell-distutils-to-use-gcc>
> 
>
allows to use gcc for "python setup.py build"
> 
>
> ok, that seems to be a problem in your python installation.
>
>
> However then the tests cannot find "aubio" module, so I'm not sure it
> built correctly, or which aubio file I should use...
>
>
> you need to install the module, or add the directory
> python/build/lib.*/ to your PYTHONPATH environment variable (see
> python/README).
>
>
> My "python/build/lib.win32-2.7" folder contains 3 files: __init__.py
>  , _aubio.pyd , and midiconv.py Is that correct ?
>
>
> yes, this looks correct (assuming these files are in a directory
> called 'aubio'). here is what i get on macosx for instance:
>
> $ find build/lib.macosx-10.6-intel-2.7/aubio
> build/lib.macosx-10.6-intel-2.7/aubio
> build/lib.macosx-10.6-intel-2.7/aubio/__init__.py
> build/lib.macosx-10.6-intel-2.7/aubio/_aubio.so
> build/lib.macosx-10.6-intel-2.7/aubio/midiconv.py
>
> python extensions should have the .pyd suffix on windows.
>
> cheers, Paul
>
>
>
>
> _______________________________________________ aubio-user mailing
> list aubio-user at aubio.org
> https://lists.aubio.org/listinfo/aubio-user





More information about the aubio-user mailing list