pathak22 / pyflow

Fast, accurate and easy to run dense optical flow with python wrapper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation error on Windows 10 with Python 3.6

gelazari opened this issue · comments

Hi guys,

I'm getting the following installation error:

Compiling pyflow.pyx because it changed.
[1/1] Cythonizing pyflow.pyx
running build_ext
building 'pyflow' extension
creating build
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\src
C:\Mingw\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -IC:\Users\gelaz\Anaconda3\lib\site-packages\numpy\core\include -IC:\User
s\gelaz\Anaconda3\lib\site-packages\numpy\core\include -IC:\Users\gelaz\Anaconda3\include -IC:\Users\gelaz\Anaconda3\inc
lude -c pyflow.cpp -o build\temp.win-amd64-3.6\Release\pyflow.o
In file included from C:\Users\gelaz\Anaconda3\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:1818:0,
from C:\Users\gelaz\Anaconda3\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:18,
from C:\Users\gelaz\Anaconda3\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4,
from pyflow.cpp:525:
C:\Users\gelaz\Anaconda3\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:13:79: note: #pragma messag
e: C:\Users\gelaz\Anaconda3\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
"#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION")
^
pyflow.cpp: In function 'PyTypeObject* __Pyx_ImportType(const char*, const char*, size_t, int)':
pyflow.cpp:7960:53: warning: unknown conversion type character 'z' in format [-Wformat=]
module_name, class_name, basicsize, size);
^
pyflow.cpp:7960:53: warning: unknown conversion type character 'z' in format [-Wformat=]
pyflow.cpp:7960:53: warning: too many arguments for format [-Wformat-extra-args]
C:\Mingw\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -IC:\Users\gelaz\Anaconda3\lib\site-packages\numpy\core\include -IC:\User
s\gelaz\Anaconda3\lib\site-packages\numpy\core\include -IC:\Users\gelaz\Anaconda3\include -IC:\Users\gelaz\Anaconda3\inc
lude -c src/Coarse2FineFlowWrapper.cpp -o build\temp.win-amd64-3.6\Release\src\coarse2fineflowwrapper.o
In file included from src/Image.h:9:0,
from src/Coarse2FineFlowWrapper.cpp:8:
src/ImageProcessing.h: In static member function 'static void ImageProcessing::ResizeImage(const T1*, T2*, int, int, int
, int, int)':
src/ImageProcessing.h:230:60: warning: 'memset' used with constant zero length parameter; this could be due to transpose
d parameters [-Wmemset-transposed-args]
memset(pDstImage,sizeof(T2)DstWidthDstHeightnChannels,0);
^
C:\Mingw\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -IC:\Users\gelaz\Anaconda3\lib\site-packages\numpy\core\include -IC:\User
s\gelaz\Anaconda3\lib\site-packages\numpy\core\include -IC:\Users\gelaz\Anaconda3\include -IC:\Users\gelaz\Anaconda3\inc
lude -c src\GaussianPyramid.cpp -o build\temp.win-amd64-3.6\Release\src\gaussianpyramid.o
In file included from src\Image.h:9:0,
from src\GaussianPyramid.h:7,
from src\GaussianPyramid.cpp:4:
src\ImageProcessing.h: In static member function 'static void ImageProcessing::ResizeImage(const T1
, T2*, int, int, int
, int, int)':
src\ImageProcessing.h:230:60: warning: 'memset' used with constant zero length parameter; this could be due to transpose
d parameters [-Wmemset-transposed-args]
memset(pDstImage,sizeof(T2)DstWidthDstHeightnChannels,0);
^
src\ImageProcessing.h: In instantiation of 'static void ImageProcessing::vfiltering(const T1
, T2*, int, int, int, const
double*, int) [with T1 = double; T2 = double]':
src\Image.h:1331:29: required from 'void Image::imfilter_hv(Image&, const double*, int, const double*, int) con
st [with T1 = double; T = double]'
src\Image.h:1199:2: required from 'void Image::GaussianSmoothing(Image&, double, int) const [with T1 = double;
T = double]'
src\GaussianPyramid.cpp:67:45: required from here
src\ImageProcessing.h:344:14: warning: unused variable 'offset' [-Wunused-variable]
int i,j,l,k,offset,ii;
^~~~~~
C:\Mingw\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -IC:\Users\gelaz\Anaconda3\lib\site-packages\numpy\core\include -IC:\User
s\gelaz\Anaconda3\lib\site-packages\numpy\core\include -IC:\Users\gelaz\Anaconda3\include -IC:\Users\gelaz\Anaconda3\inc
lude -c src\OpticalFlow.cpp -o build\temp.win-amd64-3.6\Release\src\opticalflow.o
In file included from src\Image.h:9:0,
from src\OpticalFlow.h:6,
from src\OpticalFlow.cpp:4:
src\ImageProcessing.h: In static member function 'static void ImageProcessing::ResizeImage(const T1*, T2*, int, int, int
, int, int)':
src\ImageProcessing.h:230:60: warning: 'memset' used with constant zero length parameter; this could be due to transpose
d parameters [-Wmemset-transposed-args]
memset(pDstImage,sizeof(T2)DstWidthDstHeightnChannels,0);
^
src\OpticalFlow.cpp: In static member function 'static void OpticalFlow::SmoothFlowSOR(const DImage&, const DImage&, DIm
age&, DImage&, DImage&, double, int, int, int)':
src\OpticalFlow.cpp:267:11: warning: unused variable 'power_alpha' [-Wunused-variable]
double power_alpha = 0.5;
^~~~~~~~~~~
src\OpticalFlow.cpp:287:11: warning: unused variable '_a' [-Wunused-variable]
double _a = 10000, _b = 0.1;
^~
src\OpticalFlow.cpp:287:24: warning: unused variable '_b' [-Wunused-variable]
double _a = 10000, _b = 0.1;
^~
src\OpticalFlow.cpp: In static member function 'static void OpticalFlow::SmoothFlowPDE(const DImage&, const DImage&, DIm
age&, DImage&, DImage&, double, int, int, int)':
src\OpticalFlow.cpp:545:11: warning: unused variable 'power_alpha' [-Wunused-variable]
double power_alpha = 0.5;
^~~~~~~~~~~
src\OpticalFlow.cpp:565:11: warning: unused variable '_a' [-Wunused-variable]
double _a = 10000, _b = 0.1;
^~
src\OpticalFlow.cpp:565:24: warning: unused variable '_b' [-Wunused-variable]
double _a = 10000, _b = 0.1;
^~
In file included from src\Image.h:9:0,
from src\OpticalFlow.h:6,
from src\OpticalFlow.cpp:4:
src\ImageProcessing.h: In instantiation of 'static void ImageProcessing::vfiltering(const T1
, T2*, int, int, int, const
double*, int) [with T1 = double; T2 = double]':
src\Image.h:1331:29: required from 'void Image::imfilter_hv(Image&, const double*, int, const double*, int) con
st [with T1 = double; T = double]'
src\OpticalFlow.cpp:52:42: required from here
src\ImageProcessing.h:344:14: warning: unused variable 'offset' [-Wunused-variable]
int i,j,l,k,offset,ii;
^~~~~~
In file included from src\OpticalFlow.h:6:0,
from src\OpticalFlow.cpp:4:
src\Image.h: In instantiation of 'void Image::warpImageBicubicRef(const Image&, Image&, const Image&, const
Image&, const Image&, const Image&, const Image&) const [with T1 = double; T2 = double; T = double]':
src\Image.h:2482:2: required from 'void Image::warpImageBicubicRef(const Image&, Image&, const Image&, co
nst Image&) const [with T1 = double; T = double]'
src\OpticalFlow.cpp:437:43: required from here
src\Image.h:2525:4: warning: variable 'ImgMax' set but not used [-Wunused-but-set-variable]
T ImgMax;
^~~~~~
C:\Mingw\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -IC:\Users\gelaz\Anaconda3\lib\site-packages\numpy\core\include -IC:\User
s\gelaz\Anaconda3\lib\site-packages\numpy\core\include -IC:\Users\gelaz\Anaconda3\include -IC:\Users\gelaz\Anaconda3\inc
lude -c src\Stochastic.cpp -o build\temp.win-amd64-3.6\Release\src\stochastic.o
C:\Mingw\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -IC:\Users\gelaz\Anaconda3\lib\site-packages\numpy\core\include -IC:\User
s\gelaz\Anaconda3\lib\site-packages\numpy\core\include -IC:\Users\gelaz\Anaconda3\include -IC:\Users\gelaz\Anaconda3\inc
lude -c src/Coarse2FineFlowWrapper.cpp -o build\temp.win-amd64-3.6\Release\src\coarse2fineflowwrapper.o
In file included from src/Image.h:9:0,
from src/Coarse2FineFlowWrapper.cpp:8:
src/ImageProcessing.h: In static member function 'static void ImageProcessing::ResizeImage(const T1*, T2*, int, int, int
, int, int)':
src/ImageProcessing.h:230:60: warning: 'memset' used with constant zero length parameter; this could be due to transpose
d parameters [-Wmemset-transposed-args]
memset(pDstImage,sizeof(T2)DstWidthDstHeightnChannels,0);
^
writing build\temp.win-amd64-3.6\Release\pyflow.cp36-win_amd64.def
C:\Mingw\bin\g++.exe -shared -s build\temp.win-amd64-3.6\Release\pyflow.o build\temp.win-amd64-3.6\Release\src\coarse2fi
neflowwrapper.o build\temp.win-amd64-3.6\Release\src\gaussianpyramid.o build\temp.win-amd64-3.6\Release\src\opticalflow.
o build\temp.win-amd64-3.6\Release\src\stochastic.o build\temp.win-amd64-3.6\Release\src\coarse2fineflowwrapper.o build
temp.win-amd64-3.6\Release\pyflow.cp36-win_amd64.def -LC:\Users\gelaz\Anaconda3\libs -LC:\Users\gelaz\Anaconda3\PCbuild
amd64 -lpython36 -lmsvcr140 -o C:\Users\gelaz\Desktop\pyflow\pyflow.cp36-win_amd64.pyd
build\temp.win-amd64-3.6\Release\src\coarse2fineflowwrapper.o:Coarse2FineFlowWrapper.cpp:(.text+0x11): multiple definiti
on of `Coarse2FineFlowWrapper(double
, double*, double*, double const*, double const*, double, double, int, int, int, in
t, int, int, int, int)'
build\temp.win-amd64-3.6\Release\src\coarse2fineflowwrapper.o:Coarse2FineFlowWrapper.cpp:(.text+0x11): first defined her
e
C:\Users\gelaz\Anaconda3\libs/libpython36.dll.a: error adding symbols: File format not recognized
collect2.exe: error: ld returned 1 exit status
error: command 'C:\Mingw\bin\g++.exe' failed with exit status 1

I encountered the same problem as you, there are lots of warnings and errors shown in the terminal, maybe it's caused by the mismatch of gcc/g++ version? I don't know which version the author use.

Hi, I'm encountering the same error. Has anyone found a fix yet?