Open carschandler opened 1 year ago
Ah, this may be related to https://github.com/opencv/opencv-python/pull/870
conda-forge's opencv Python package is not generated via the setup.py from https://github.com/opencv/opencv-python, but directly from the CMake scripts of opencv, see https://github.com/conda-forge/opencv-feedstock/blob/main/recipe/build.sh#L138 . Somehow those files are not generated and/or installed by cmake.
This PR ( https://github.com/opencv/opencv/pull/20370 ) looks relevant. AFAICT it was merged in 4.8.0. IOW just recently enabled. Maybe there are some bugs with the implementation? It doesn't look like there are any flags for us to add
@traversaro @jakirkham I think the PR I mentioned in my comment above might address it? It looks to be adding something to the Cmake process. It sounds like it hasn't been published yet though? Not sure how opencv's upstream works but maybe the feedstock isn't yet pulling a version of the source code that has that change?
Edit: never mind, I see that that is being called from the setup.py itself now...
This PR ( opencv/opencv#20370 ) looks relevant. AFAICT it was merged in 4.8.0. IOW just recently enabled. Maybe there are some bugs with the implementation? It doesn't look like there are any flags for us to add
I noticed that the CMake logic is checking if the variable OPENCV_PYTHON_INSTALL_PATH
(https://github.com/opencv/opencv/pull/20370/files#diff-aab3dbb34ead90d7bdda4fab168c3e9688d4e26d21020ea98dc91e08e2a69c72R140), while we set the OPENCV_PYTHON3_INSTALL_PATH
. On the other hand, also the PyPI recipe of opencv is setting OPENCV_PYTHON3_INSTALL_PATH
, see https://github.com/opencv/opencv-python/blob/705bb5d2554b12a0c1f9ae9050e88af0c588e799/setup.py#L180 , so probably there is some logic in OpenCV's cmake that set OPENCV_PYTHON_INSTALL_PATH based on OPENCV_PYTHON3_INSTALL_PATH .
@traversaro should I open an issue on the opencv
repo?
@traversaro should I open an issue on the
opencv
repo?
I may be wrong, but it seems a packaging issue, probably the proper place to track this is this issue.
Hi is there any update to this issue?
Only update I have is that the package in nixpkgs
also has this issue: https://github.com/NixOS/nixpkgs/issues/292395
Any updates or workarounds? This is quite annoying.
As of today the only viable solution is a dirty installation with pip in a conda env, am I right?
Solution to issue cannot be found in the documentation.
Issue
I've been trying to get code completion working with opencv and the pyright LSP server... I read that in opencv v4.8.0, the python type stubs have been included in the source code, and I've found some evidence for this on the GitHub repo, but in my package installed through conda-forge, I haven't found any instances of .pyi files or any results for "stub" in the directory.
Installed packages
Environment info