ucrdtw icon indicating copy to clipboard operation
ucrdtw copied to clipboard

Error while installing on Py 2.7

Open martykuentzel opened this issue 7 years ago • 2 comments

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\marty~1.kue\app 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~1.kue\appdata\local\temp\pip-nrb 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

martykuentzel avatar Oct 16 '17 19:10 martykuentzel

Hi Marty, I am in the same situation and using similar system requironments (Windows, Anaconda and MVC) like you. I would like to integrate this package in my project. However, I get the same error message as you try to install the package. Could you solve this issue or advise an alternative? Best regards Kev

HaaKe1 avatar Mar 29 '18 12:03 HaaKe1

Hey Kev,

No sorry. I spent countless hours trying to fix it, but I assume that the errors lies somewhere in the C++ code and I have no knowledge of how C++ works. I "solved" it simply by switching to python 3.5.

best regards

2018-03-29 14:36 GMT+02:00 HaaKe1 [email protected]:

Hi Marty, I am in the same situation and using similar system requironments (Windows, Anaconda and MVC) like you. I would like to integrate this package in my project. However, I get the same error message as you try to install the package. Could you solve this issue or advise an alternative? Best regards Kev

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/klon/ucrdtw/issues/10#issuecomment-377221585, or mute the thread https://github.com/notifications/unsubscribe-auth/Aee5ss_TfsNJGr924cT2WNeyLU6CnUNjks5tjNVggaJpZM4P7JaH .

martykuentzel avatar Mar 29 '18 12:03 martykuentzel