Ask Your Question
0

Python and C++ : different compilers ok?

asked 2015-07-31 11:00:33 -0600

TerryJ gravatar image

updated 2015-07-31 11:51:40 -0600

Hi all, I have been looking at opencv (3.0) closely. I haven't decided whether I will have a C++ application or a Python application.

I am wondering what sort of environment C++ developers have? Do you folks mix C++ and Python code? I mean is there any reason for you to pass data structures around from Python to your own C++ extension module? Or perhaps call some simple Python script from my C++ executable?.

In Windows, I plan the following opencv 3 environment: For C++: Use Visual Studio 2012, and get pre built x64 opencv 3.0 build.
For Python : Get the 64 bit anaconda distribution which has everything for opencv bundled. (basically they are not from the same compiler )

Would this pose any problems? Are there situations due to which, later I would have to build Python, numpy, opencv everything later from one common compiler?.
Thanks T

edit retag flag offensive close merge delete

Comments

the prebuilt cv2.pyd is a self-consistant binary, which compiler it was built with, does not matter.

but if you have the c++ version from somewhere, and the python binaries from somewhere else, you probably have a version conflict (i even doubt, that conda will install the opencv 3 version)

last but not least - with opencv3, you will pretty soon discover, that you will need the opencv_contrib repo (facerec, SIFT, and whatnot). and in this case, you will have to build both c++ and python version from src.

maybe installing prebuilt stuff is not such a great idea with 3.0

berak gravatar imageberak ( 2015-08-01 02:23:27 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-08-01 02:51:55 -0600

TerryJ gravatar image

I see. So, the best thing is to build opencv, python, numpy and everything. Glad I asked this one at an early stage. Thanks.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-07-31 11:00:33 -0600

Seen: 433 times

Last updated: Jul 31 '15