1

I am trying to install OpenCV 4.5.5 with CUDA support. I installed the source from their GitHub and the additional OpenCV contrib and built it with CMAKE. I checked BUILD_opencv_python3 when it was done configuring and generating it showed that it had detected python3 and had installed cv2 in site-packages.

CMAKE says it detects python and installs CV2

But cv2 isn't in the site-packages.

CV2 not included in site-packages

So it doesn't load in python. But it does give an interesting error DLL not loaded

What should I do?

I already tried doing a fresh build with CMAKE but it didn't work.

After building OpenCV it generates a PYD file in the lib folder. I don't know if that is helpful or not.

Thanks

2

1 Answer 1

2

You must have missed a step in the process.

  • "Configure" step in cmake-gui, investigates the environment (various paths, e.g. where python wants packages to go) and prepares information for the build
  • "Generate" step in cmake-gui, generates the actual build files (VS Solution)
  • open the .sln in Visual Studio
  • build the ALL_BUILD target
  • build the INSTALL target, and this installs the files, also the python package
Sign up to request clarification or add additional context in comments.

1 Comment

I just ran the INSTALL and it seemed to have worked. I did run the ALL_BUILD though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.