-
Notifications
You must be signed in to change notification settings - Fork 896
[Question] Building wheel with GPU support on Windows #742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The numpy version in the pyproject.toml seems to be too old. 1.21.2 does not have Windows wheels, so pip tries to build from sources and fails. You can set the version to 1.21.3 in pyproject.toml: Line 11 in 3725898
|
@skvark , thanks for the prompt reply!
Apparently, there is no /numpy/ndarrayobject.h in opencv-python\opencv\modules\python\src2 Edit: Still, it doesn't recognized by the compiler - fails with the same error. BTW, is it ok to keep this thread here, or it is better to move it to SO? |
I think it's okay to keep it here since there is an outdated dependency in the pyproject.toml which is a bug. Try running the |
I tried running pip wheel without activating .venv
pip wheel . --verbose still fails with the same error.
Intrestingly enough, in section General configuration for OpenCV 4.6.0 I do have a path to numpy core...
|
Try to remove the |
@skvark
No any args (like Edit: |
@skvark - after removing skbuild directory, I have successfully build a custom wheel. Probably the final question from my side- the build itself is substantionnaly slow, due to utilizing only one core of the cpu. What are the args ( similar to make --j8) to utilize all the cores during build on windows? |
I think CMake / OpenCV should use all available cores by default. Try to use Powershell or the command line, I think Git Bash might have something to do with that issue as well. You can however try to add the -DCMAKE_CXX_FLAGS=/MP flag if you must use Git Bash for some reason. |
@skvark , Thank you so much! I am closing this issue. |
Hi,
I have an issue when trying to build pip wheel with GPU support on windows.
System configuration:
Windows 10
Visual Studio 2022 Community edition
Cmake 3.25.0-rc3
CUDA 11.7
CUDNN 8.6
python 3.10.7
Steps to reproduce:
Actual behaviour
It starts to install packages and fails with the following traceback:
#first, it warns that ignoring installed numpy
after that, it fails during numpy build.
Any thoughts/ideas?
Should I downgrade to python 3.9 or any other version?
The text was updated successfully, but these errors were encountered: