klon / ucrdtw Goto Github PK
View Code? Open in Web Editor NEWPython extension for UCR Suite highly optimized subsequence search using Dynamic Time Warping (DTW)
Python extension for UCR Suite highly optimized subsequence search using Dynamic Time Warping (DTW)
Thanks for the great code!
I built the package by running 'make' at the top level and it seems to of worked.
However, I now try
import _ucrdtw
and get the error
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named _ucrdtw
Any ideas?
I had problems installing the package on Mac OS,
what helped was
export CFLAGS="-I /usr/local/lib/python2.7/site-packages/numpy/core/include $CFLAGS"
In the comments I see that ucrdtwf is for streaming data but do not see any examples for it.
Could you please let me know if this function is working and how it is different from ucrdtw.
Thanks!
Hey
I could succesfully use this great package on python 3.5 but unfortunately I had to change to 2.7.
After several hours of trying I cant fix this emerging error:
src/_ucrdtw.c(73) : error C2275: 'PyObject' : illegal use of this type as an
expression
c:\users\marty.kuentzel\appdata\local\continuum\anaconda3\envs\py27
include\object.h(108) : see declaration of 'PyObject'
src/_ucrdtw.c(73) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(74) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(74) : warning C4047: '==' : 'int' differs in levels of indirec
tion from 'void *'
src/_ucrdtw.c(75) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(75) : warning C4047: '==' : 'int' differs in levels of indirec
tion from 'void *'
src/_ucrdtw.c(75) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(75) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(75) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(81) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(81) : warning C4047: '==' : 'int' differs in levels of indirec
tion from 'void *'
src/_ucrdtw.c(81) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(81) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(81) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(85) : error C2275: 'PyObject' : illegal use of this type as an
expression
c:\users\marty.kuentzel\appdata\local\continuum\anaconda3\envs\py27
include\object.h(108) : see declaration of 'PyObject'
src/_ucrdtw.c(85) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(86) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(86) : warning C4047: '==' : 'int' differs in levels of indirec
tion from 'void *'
src/_ucrdtw.c(87) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(87) : warning C4047: '==' : 'int' differs in levels of indirec
tion from 'void *'
src/_ucrdtw.c(87) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(87) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(87) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(88) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(88) : warning C4047: '==' : 'int' differs in levels of indirec
tion from 'void *'
src/_ucrdtw.c(88) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(88) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(88) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(94) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(95) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(97) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(98) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(100) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(103) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(104) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(105) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(108) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(108) : warning C4047: '==' : 'int' differs in levels of indire
ction from 'void *'
src/_ucrdtw.c(108) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(108) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(108) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(109) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(109) : warning C4047: '==' : 'int' differs in levels of indire
ction from 'void *'
src/_ucrdtw.c(109) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(109) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(109) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(111) : error C2065: 'status' : undeclared identifier
src/_ucrdtw.c(117) : error C2275: 'PyObject' : illegal use of this type as a
n expression
c:\users\marty.kuentzel\appdata\local\continuum\anaconda3\envs\py27
include\object.h(108) : see declaration of 'PyObject'
src/_ucrdtw.c(117) : error C2065: 'ret' : undeclared identifier
src/_ucrdtw.c(117) : error C2065: 'location' : undeclared identifier
src/_ucrdtw.c(117) : error C2065: 'distance' : undeclared identifier
src/_ucrdtw.c(118) : error C2065: 'ret' : undeclared identifier
src/_ucrdtw.c(118) : warning C4047: 'return' : 'PyObject *' differs in level
s of indirection from 'int'
error: Command "C:\Users\Marty.kuentzel\AppData\Local\Programs\Common\Micros
oft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /D
NDEBUG -IC:\Users\Marty.kuentzel\AppData\Local\Continuum\Anaconda3\envs\py27\lib
\site-packages\numpy\core\include -IC:\Users\Marty.kuentzel\AppData\Local\Contin
uum\Anaconda3\envs\py27\include -IC:\Users\Marty.kuentzel\AppData\Local\Continuu
m\Anaconda3\envs\py27\PC /Tcsrc/_ucrdtw.c /Fobuild\temp.win-amd64-2.7\Release\sr
c/_ucrdtw.obj" failed with exit status 2
----------------------------------------
Command "C:\Users\Marty.kuentzel\AppData\Local\Continuum\Anaconda3\envs\py27\pyt
hon.exe -u -c "import setuptools, tokenize;file='c:\users\marty1.kue\app1.kue\appdata\local\temp\pip-nrb
data\local\temp\pip-6owkce-build\setup.py';f=getattr(tokenize, 'open', open)
(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, fi
le, 'exec'))" install --record c:\users\marty
rmb-record\install-record.txt --single-version-externally-managed --compile" fai
led with error code 1 in c:\users\marty~1.kue\appdata\local\temp\pip-6owkce-buil
d\
I am kind of desperate since this package plays a huge part in my Project, but I am unable to fix this C++ Code by myself. Can anyone help me with this issue ?
I am using Windows, Anaconda and I installed the Microsoft Visual C++ Compiler for Python 2.7 .
Best regards
Marty
Has anyone built this library on Windows 7, 64bit O/S?
The output from python setup.py build follows:
C:\Users\p\Downloads\ucrdtw-master>python setup.py build
running build
running build_ext
No module named msvccompiler in numpy.distutils; trying from distutils
building '_ucrdtw' extension
C:\Users\p\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC /Tcsrc/_ucrdtw.c /Fobuild\temp.
win-amd64-2.7\Release\src/_ucrdtw.obj
Found executable C:\Users\p\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe
_ucrdtw.c
c:\python27\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
src/_ucrdtw.c(73) : error C2275: 'PyObject' : illegal use of this type as an expression
c:\python27\include\object.h(108) : see declaration of 'PyObject'
src/_ucrdtw.c(73) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(74) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(74) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
src/_ucrdtw.c(75) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(75) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
src/_ucrdtw.c(75) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(75) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(75) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(81) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(81) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
src/_ucrdtw.c(81) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(81) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(81) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(85) : error C2275: 'PyObject' : illegal use of this type as an expression
c:\python27\include\object.h(108) : see declaration of 'PyObject'
src/_ucrdtw.c(85) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(86) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(86) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
src/_ucrdtw.c(87) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(87) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
src/_ucrdtw.c(87) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(87) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(87) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(88) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(88) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
src/_ucrdtw.c(88) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(88) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(88) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(94) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(95) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(97) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(98) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(100) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(103) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(104) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(105) : error C2143: syntax error : missing ';' before 'type'
src/_ucrdtw.c(108) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(108) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
src/_ucrdtw.c(108) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(108) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(108) : error C2065: 'data_array' : undeclared identifier
src/_ucrdtw.c(109) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(109) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
src/_ucrdtw.c(109) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(109) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(109) : error C2065: 'query_array' : undeclared identifier
src/_ucrdtw.c(111) : error C2065: 'status' : undeclared identifier
src/_ucrdtw.c(117) : error C2275: 'PyObject' : illegal use of this type as an expression
c:\python27\include\object.h(108) : see declaration of 'PyObject'
src/_ucrdtw.c(117) : error C2065: 'ret' : undeclared identifier
src/_ucrdtw.c(117) : error C2065: 'location' : undeclared identifier
src/_ucrdtw.c(117) : error C2065: 'distance' : undeclared identifier
src/_ucrdtw.c(118) : error C2065: 'ret' : undeclared identifier
src/_ucrdtw.c(118) : warning C4047: 'return' : 'PyObject *' differs in levels of indirection from 'int'
error: Command "C:\Users\p\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC /Tcsrc/_ucrdtw.
c /Fobuild\temp.win-amd64-2.7\Release\src/_ucrdtw.obj" failed with exit status 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.