-
Notifications
You must be signed in to change notification settings - Fork 12
Need compilation instructions for Windows #17
Comments
I've never tried building it on Windows. You would need to help it find your OpenCV installation for it to work. There are probably arguments to pip you can use? |
okay, let me try to reinstall the opencv stuff ... |
How do you have OpenCV installed? |
Also, you may find it easier to get realtime help at https://gitter.im/robotpy/robotpy-wpilib if you're doing it now. |
I installed opencv by downloading the opencv for windows and extracted it. I tried to add the path into system variable. In python 3.6, I am able to import cv2. |
Yeah, the thing you would need to do then is put the include/lib files somewhere that python can find them. Maybe in the 'include' directory for site-packages? Another route you could do is add an environment variable to setup.py, and tell it where the OpenCV install is. |
You can also figure out where python keeps its stuff by running |
Hi, my dear friend!Now the cannot find path has been solved by compiling opencv from source. However, another and the only issue popped up! Please Help!
Please help! I really need this to work. Crying! And What System do you use when you use the cscore lib? Thank you! |
I believe that's an error related to pybind11 and Visual Studio 2017. It looks like they just released a new version of pybind11 yesterday, I haven't tested with it yet. I also don't have VS 2017 (or Windows with a compiler easily available), so I can't test that either. What I would recommend to you is separate the cscore portion of your code from the opencv portion, that way you can run the code and test your image processing with static images. maybe next year we'll have a better way to do that. But basically, only import cscore when you're actually using it, not at the toplevel of your module. Hopefully next year we'll get Windows support working, but it sounds like it isn't going to work for you. Anyways, it's not super useful on Windows, as USBCamera isn't supported there yet. |
Ok, I spent way too long trying to get this all to compile on Windows. Thankfully with a bit of help and some massaging of the setup.py, I managed to build this. Here's how I did it:
set CL=/I%CONDA_PREFIX%\Library\include /std:c++14 /DNOMINMAX
set LIB=%CONDA_PREFIX%\Library\lib
Here's the wheel I built for Python 3.7 on x64 with OpenCV 3.4.2: https://vovo.id.au/tmp/robotpy_cscore-2019.0.2.post0.dev0-cp37-cp37m-win_amd64.whl |
I think with our pkg-config support now and the Windows fixes I put in last year, building with conda-forge should be quite doable without a lot of effort. I think we're forgetting to pass the If we can make compilation "just" work, we should submit to conda-forge. |
After attempting to build on Windows with conda-forge, it turns out that OpenCV does not generate pkg-config info at all on Windows, see conda-forge/opencv-feedstock#254 |
I have c++ 14 on visual studio 2017, pybind11, The pip installation went well until:
Is there any solution for this issue or which system is currently supported? Thank you!
The text was updated successfully, but these errors were encountered: