Skip to content
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

No .pyi files/type stubs? #374

Closed
1 task done
carschandler opened this issue Aug 10, 2023 · 20 comments · Fixed by #434
Closed
1 task done

No .pyi files/type stubs? #374

carschandler opened this issue Aug 10, 2023 · 20 comments · Fixed by #434
Labels

Comments

@carschandler
Copy link

Solution to issue cannot be found in the documentation.

  • I checked 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

Name                                  Version       Build                 Channel
─────────────────────────────────────────────────────────────────────────────────────────
  _libgcc_mutex                         0.1           conda_forge           conda-forge
  _openmp_mutex                         4.5           2_gnu                 conda-forge
  aiohttp                               3.8.5         py311h459d7ec_0       conda-forge
  aiosignal                             1.3.1         pyhd8ed1ab_0          conda-forge
  alsa-lib                              1.2.9         hd590300_0            conda-forge
  aom                                   3.5.0         h27087fc_0            conda-forge
  asttokens                             2.2.1         pyhd8ed1ab_0          conda-forge
  async-timeout                         4.0.2         pyhd8ed1ab_0          conda-forge
  attr                                  2.5.1         h166bdaf_1            conda-forge
  attrs                                 23.1.0        pyh71513ae_1          conda-forge
  aws-c-auth                            0.7.0         hf8751d9_2            conda-forge
  aws-c-cal                             0.6.0         h93469e0_0            conda-forge
  aws-c-common                          0.8.23        hd590300_0            conda-forge
  aws-c-compression                     0.2.17        h862ab75_1            conda-forge
  aws-c-event-stream                    0.3.1         h9599702_1            conda-forge
  aws-c-http                            0.7.11        hbe98c3e_0            conda-forge
  aws-c-io                              0.13.28       h3870b5a_0            conda-forge
  aws-c-mqtt                            0.8.14        h2e270ba_2            conda-forge
  aws-c-s3                              0.3.13        heb0bb06_2            conda-forge
  aws-c-sdkutils                        0.1.11        h862ab75_1            conda-forge
  aws-checksums                         0.1.16        h862ab75_1            conda-forge
  aws-crt-cpp                           0.20.3        he9c0e7f_4            conda-forge
  aws-sdk-cpp                           1.10.57       hbc2ea52_17           conda-forge
  backcall                              0.2.0         pyh9f0ad1d_0          conda-forge
  backports                             1.0           pyhd8ed1ab_3          conda-forge
  backports.functools_lru_cache         1.6.5         pyhd8ed1ab_0          conda-forge
  blosc                                 1.21.4        h0f2a231_0            conda-forge
  brotli                                1.0.9         h166bdaf_9            conda-forge
  brotli-bin                            1.0.9         h166bdaf_9            conda-forge
  brotli-python                         1.0.9         py311ha362b79_9       conda-forge
  bzip2                                 1.0.8         h7f98852_4            conda-forge
  c-ares                                1.19.1        hd590300_0            conda-forge
  ca-certificates                       2023.7.22     hbcca054_0            conda-forge
  cairo                                 1.16.0        hbbf8b49_1016         conda-forge
  certifi                               2023.7.22     pyhd8ed1ab_0          conda-forge
  charset-normalizer                    3.2.0         pyhd8ed1ab_0          conda-forge
  contourpy                             1.1.0         py311h9547e67_0       conda-forge
  cycler                                0.11.0        pyhd8ed1ab_0          conda-forge
  dav1d                                 1.2.1         hd590300_0            conda-forge
  dbus                                  1.13.6        h5008d03_3            conda-forge
  decorator                             5.1.1         pyhd8ed1ab_0          conda-forge
  double-conversion                     3.3.0         h59595ed_0            conda-forge
  eigen                                 3.4.0         h00ab1b0_0            conda-forge
  executing                             1.2.0         pyhd8ed1ab_0          conda-forge
  expat                                 2.5.0         hcb278e6_1            conda-forge
  ffmpeg                                6.0.0         gpl_hdbbbd96_103      conda-forge
  font-ttf-dejavu-sans-mono             2.37          hab24e00_0            conda-forge
  font-ttf-inconsolata                  3.000         h77eed37_0            conda-forge
  font-ttf-source-code-pro              2.038         h77eed37_0            conda-forge
  font-ttf-ubuntu                       0.83          hab24e00_0            conda-forge
  fontconfig                            2.14.2        h14ed4e7_0            conda-forge
  fonts-conda-ecosystem                 1             0                     conda-forge
  fonts-conda-forge                     1             0                     conda-forge
  fonttools                             4.42.0        py311h459d7ec_0       conda-forge
  freeglut                              3.2.2         hac7e632_2            conda-forge
  freetype                              2.12.1        hca18f0e_1            conda-forge
  fribidi                               1.0.10        h36c2ea0_0            conda-forge
  frozenlist                            1.4.0         py311h459d7ec_0       conda-forge
  gettext                               0.21.1        h27087fc_0            conda-forge
  gl2ps                                 1.4.2         h0708190_0            conda-forge
  glew                                  2.1.0         h9c3ff4c_2            conda-forge
  glib                                  2.76.4        hfc55251_0            conda-forge
  glib-tools                            2.76.4        hfc55251_0            conda-forge
  gmp                                   6.2.1         h58526e2_0            conda-forge
  gnutls                                3.7.8         hf3e180e_0            conda-forge
  graphite2                             1.3.13        h58526e2_1001         conda-forge
  gst-plugins-base                      1.22.5        hf7dbed1_0            conda-forge
  gstreamer                             1.22.5        h98fc4e7_0            conda-forge
  harfbuzz                              7.3.0         hdb3a94d_0            conda-forge
  hdf4                                  4.2.15        h501b40f_6            conda-forge
  hdf5                                  1.14.1        nompi_h4f84152_100    conda-forge
  icu                                   72.1          hcb278e6_0            conda-forge
  idna                                  3.4           pyhd8ed1ab_0          conda-forge
  ipython                               8.14.0        pyh41d4057_0          conda-forge
  jasper                                4.0.0         h32699f2_1            conda-forge
  jedi                                  0.19.0        pyhd8ed1ab_0          conda-forge
  jsoncpp                               1.9.5         h4bd325d_1            conda-forge
  keyutils                              1.6.1         h166bdaf_0            conda-forge
  kiwisolver                            1.4.4         py311h4dd048b_1       conda-forge
  krb5                                  1.21.1        h659d440_0            conda-forge
  lame                                  3.100         h166bdaf_1003         conda-forge
  lcms2                                 2.15          haa2dc70_1            conda-forge
  ld_impl_linux-64                      2.40          h41732ed_0            conda-forge
  lerc                                  4.0.0         h27087fc_0            conda-forge
  libabseil                             20230125.3    cxx17_h59595ed_0      conda-forge
  libaec                                1.0.6         hcb278e6_1            conda-forge
  libass                                0.17.1        hc9aadba_0            conda-forge
  libblas                               3.9.0         17_linux64_openblas   conda-forge
  libbrotlicommon                       1.0.9         h166bdaf_9            conda-forge
  libbrotlidec                          1.0.9         h166bdaf_9            conda-forge
  libbrotlienc                          1.0.9         h166bdaf_9            conda-forge
  libcap                                2.69          h0f662aa_0            conda-forge
  libcblas                              3.9.0         17_linux64_openblas   conda-forge
  libclang                              15.0.7        default_h7634d5b_3    conda-forge
  libclang13                            15.0.7        default_h9986a30_3    conda-forge
  libcups                               2.3.3         h4637d8d_4            conda-forge
  libcurl                               8.2.1         hca28451_0            conda-forge
  libdeflate                            1.18          h0b41bf4_0            conda-forge
  libdrm                                2.4.114       h166bdaf_0            conda-forge
  libedit                               3.1.20191231  he28a2e2_2            conda-forge
  libev                                 4.33          h516909a_1            conda-forge
  libevent                              2.1.12        hf998b51_1            conda-forge
  libexpat                              2.5.0         hcb278e6_1            conda-forge
  libffi                                3.4.2         h7f98852_5            conda-forge
  libflac                               1.4.3         h59595ed_0            conda-forge
  libgcc-ng                             13.1.0        he5830b7_0            conda-forge
  libgcrypt                             1.10.1        h166bdaf_0            conda-forge
  libgfortran-ng                        13.1.0        h69a702a_0            conda-forge
  libgfortran5                          13.1.0        h15d22d2_0            conda-forge
  libglib                               2.76.4        hebfc3b9_0            conda-forge
  libglu                                9.0.0         hac7e632_1002         conda-forge
  libgomp                               13.1.0        he5830b7_0            conda-forge
  libgpg-error                          1.47          h71f35ed_0            conda-forge
  libhwloc                              2.9.2         nocuda_h7313eea_1008  conda-forge
  libiconv                              1.17          h166bdaf_0            conda-forge
  libidn2                               2.3.4         h166bdaf_0            conda-forge
  libjpeg-turbo                         2.1.5.1       h0b41bf4_0            conda-forge
  liblapack                             3.9.0         17_linux64_openblas   conda-forge
  liblapacke                            3.9.0         17_linux64_openblas   conda-forge
  libllvm15                             15.0.7        h5cf9203_3            conda-forge
  libnetcdf                             4.9.2         nompi_h7e745eb_109    conda-forge
  libnghttp2                            1.52.0        h61bc06f_0            conda-forge
  libnsl                                2.0.0         h7f98852_0            conda-forge
  libogg                                1.3.4         h7f98852_1            conda-forge
  libopenblas                           0.3.23        pthreads_h80387f5_0   conda-forge
  libopencv                             4.8.0         py311h8aafb54_0       conda-forge
  libopenvino                           2023.0.1      h59595ed_2            conda-forge
  libopenvino-auto-batch-plugin         2023.0.1      h59595ed_2            conda-forge
  libopenvino-auto-plugin               2023.0.1      h59595ed_2            conda-forge
  libopenvino-hetero-plugin             2023.0.1      h59595ed_2            conda-forge
  libopenvino-intel-cpu-plugin          2023.0.1      h59595ed_2            conda-forge
  libopenvino-intel-gpu-plugin          2023.0.1      h59595ed_2            conda-forge
  libopenvino-ir-frontend               2023.0.1      h59595ed_2            conda-forge
  libopenvino-onnx-frontend             2023.0.1      h59595ed_2            conda-forge
  libopenvino-paddle-frontend           2023.0.1      h59595ed_2            conda-forge
  libopenvino-pytorch-frontend          2023.0.1      h59595ed_2            conda-forge
  libopenvino-tensorflow-frontend       2023.0.1      h59595ed_2            conda-forge
  libopenvino-tensorflow-lite-frontend  2023.0.1      h59595ed_2            conda-forge
  libopus                               1.3.1         h7f98852_1            conda-forge
  libpciaccess                          0.17          h166bdaf_0            conda-forge
  libpng                                1.6.39        h753d276_0            conda-forge
  libpq                                 15.3          hfc447b1_2            conda-forge
  libprotobuf                           3.21.12       h3eb15da_0            conda-forge
  libsndfile                            1.2.0         hb75c966_0            conda-forge
  libsqlite                             3.42.0        h2797004_0            conda-forge
  libssh2                               1.11.0        h0841786_0            conda-forge
  libstdcxx-ng                          13.1.0        hfd8a6a1_0            conda-forge
  libsystemd0                           254           h3516f8a_0            conda-forge
  libtasn1                              4.19.0        h166bdaf_0            conda-forge
  libtheora                             1.1.1         h7f98852_1005         conda-forge
  libtiff                               4.5.1         h8b53f26_0            conda-forge
  libunistring                          0.9.10        h7f98852_0            conda-forge
  libuuid                               2.38.1        h0b41bf4_0            conda-forge
  libva                                 2.19.0        hd590300_0            conda-forge
  libvorbis                             1.3.7         h9c3ff4c_0            conda-forge
  libvpx                                1.13.0        hcb278e6_0            conda-forge
  libwebp-base                          1.3.1         hd590300_0            conda-forge
  libxcb                                1.15          h0b41bf4_0            conda-forge
  libxkbcommon                          1.5.0         h5d7e998_3            conda-forge
  libxml2                               2.11.4        h0d562d8_0            conda-forge
  libzip                                1.9.2         hc929e4a_1            conda-forge
  libzlib                               1.2.13        hd590300_5            conda-forge
  loguru                                0.7.0         py311h38be061_0       conda-forge
  lz4-c                                 1.9.4         hcb278e6_0            conda-forge
  matplotlib                            3.7.2         py311h38be061_0       conda-forge
  matplotlib-base                       3.7.2         py311h54ef318_0       conda-forge
  matplotlib-inline                     0.1.6         pyhd8ed1ab_0          conda-forge
  mpg123                                1.31.3        hcb278e6_0            conda-forge
  multidict                             6.0.4         py311h2582759_0       conda-forge
  munkres                               1.1.4         pyh9f0ad1d_0          conda-forge
  mysql-common                          8.0.33        hf1915f5_2            conda-forge
  mysql-libs                            8.0.33        hca2cd23_2            conda-forge
  ncurses                               6.4           hcb278e6_0            conda-forge
  nettle                                3.8.1         hc379101_1            conda-forge
  nlohmann_json                         3.11.2        h27087fc_0            conda-forge
  nspr                                  4.35          h27087fc_0            conda-forge
  nss                                   3.89          he45b914_0            conda-forge
  numpy                                 1.25.2        py311h64a7726_0       conda-forge
  ocl-icd                               2.3.1         h7f98852_0            conda-forge
  ocl-icd-system                        1.0.0         1                     conda-forge
  opencv                                4.8.0         py311h38be061_0       conda-forge
  openh264                              2.3.1         hcb278e6_2            conda-forge
  openjpeg                              2.5.0         hfec8fc6_2            conda-forge
  openssl                               3.1.2         hd590300_0            conda-forge
  p11-kit                               0.24.1        hc5aa10d_0            conda-forge
  packaging                             23.1          pyhd8ed1ab_0          conda-forge
  pandas                                2.0.3         py311h320fe9a_1       conda-forge
  parso                                 0.8.3         pyhd8ed1ab_0          conda-forge
  patsy                                 0.5.3         pyhd8ed1ab_0          conda-forge
  pcre2                                 10.40         hc3806b6_0            conda-forge
  pexpect                               4.8.0         pyh1a96a4e_2          conda-forge
  pickleshare                           0.7.5         py_1003               conda-forge
  pillow                                10.0.0        py311h0b84326_0       conda-forge
  pip                                   23.2.1        pyhd8ed1ab_0          conda-forge
  pixman                                0.40.0        h36c2ea0_0            conda-forge
  platformdirs                          3.10.0        pyhd8ed1ab_0          conda-forge
  plotly                                5.15.0        pyhd8ed1ab_0          conda-forge
  ply                                   3.11          py_1                  conda-forge
  pooch                                 1.7.0         pyha770c72_3          conda-forge
  proj                                  9.2.1         ha643af7_0            conda-forge
  prompt-toolkit                        3.0.39        pyha770c72_0          conda-forge
  prompt_toolkit                        3.0.39        hd8ed1ab_0            conda-forge
  pthread-stubs                         0.4           h36c2ea0_1001         conda-forge
  ptyprocess                            0.7.0         pyhd3deb0d_0          conda-forge
  pugixml                               1.13          h59595ed_1            conda-forge
  pulseaudio-client                     16.1          hb77b528_4            conda-forge
  pure_eval                             0.2.2         pyhd8ed1ab_0          conda-forge
  py-opencv                             4.8.0         py311h781c19f_0       conda-forge
  pygments                              2.16.1        pyhd8ed1ab_0          conda-forge
  pyparsing                             3.0.9         pyhd8ed1ab_0          conda-forge
  pyqt                                  5.15.9        py311hf0fb5b6_4       conda-forge
  pyqt5-sip                             12.12.2       py311hb755f60_4       conda-forge
  pysocks                               1.7.1         pyha2e5f31_6          conda-forge
  python                                3.11.4        hab00c5b_0_cpython    conda-forge
  python-dateutil                       2.8.2         pyhd8ed1ab_0          conda-forge
  python-tzdata                         2023.3        pyhd8ed1ab_0          conda-forge
  python_abi                            3.11          3_cp311               conda-forge
  pytz                                  2023.3        pyhd8ed1ab_0          conda-forge
  qt-main                               5.15.8        h7fe3ca9_15           conda-forge
  readline                              8.2           h8228510_1            conda-forge
  requests                              2.31.0        pyhd8ed1ab_0          conda-forge
  rocm-smi                              5.6.0         h59595ed_1            conda-forge
  s2n                                   1.3.46        h06160fa_0            conda-forge
  scipy                                 1.11.1        py311h64a7726_0       conda-forge
  seaborn                               0.12.2        hd8ed1ab_0            conda-forge
  seaborn-base                          0.12.2        pyhd8ed1ab_0          conda-forge
  setuptools                            68.0.0        pyhd8ed1ab_0          conda-forge
  sip                                   6.7.11        py311hb755f60_0       conda-forge
  six                                   1.16.0        pyh6c4a22f_0          conda-forge
  snappy                                1.1.10        h9fff704_0            conda-forge
  sqlite                                3.42.0        h2c6b66d_0            conda-forge
  stack_data                            0.6.2         pyhd8ed1ab_0          conda-forge
  statsmodels                           0.14.0        py311h1f0f07a_1       conda-forge
  svt-av1                               1.6.0         h59595ed_0            conda-forge
  tbb                                   2021.10.0     h00ab1b0_0            conda-forge
  tbb-devel                             2021.10.0     h00ab1b0_0            conda-forge
  tenacity                              8.2.2         pyhd8ed1ab_0          conda-forge
  tk                                    8.6.12        h27826a3_0            conda-forge
  toml                                  0.10.2        pyhd8ed1ab_0          conda-forge
  tomli                                 2.0.1         pyhd8ed1ab_0          conda-forge
  tornado                               6.3.2         py311h459d7ec_0       conda-forge
  traitlets                             5.9.0         pyhd8ed1ab_0          conda-forge
  typing-extensions                     4.7.1         hd8ed1ab_0            conda-forge
  typing_extensions                     4.7.1         pyha770c72_0          conda-forge
  tzdata                                2023c         h71feb2d_0            conda-forge
  unicodedata2                          15.0.0        py311hd4cff14_0       conda-forge
  urllib3                               2.0.4         pyhd8ed1ab_0          conda-forge
  utfcpp                                3.2.3         ha770c72_0            conda-forge
  vtk                                   9.2.6         qt_py311h1234567_210  conda-forge
  vtk-base                              9.2.6         qt_py311h1234567_210  conda-forge
  vtk-io-ffmpeg                         9.2.6         qt_py311h1234567_210  conda-forge
  wcwidth                               0.2.6         pyhd8ed1ab_0          conda-forge
  wheel                                 0.41.1        pyhd8ed1ab_0          conda-forge
  wslink                                1.11.1        pyhd8ed1ab_0          conda-forge
  x264                                  1!164.3095    h166bdaf_2            conda-forge
  x265                                  3.5           h924138e_3            conda-forge
  xcb-util                              0.4.0         hd590300_1            conda-forge
  xcb-util-image                        0.4.0         h8ee46fc_1            conda-forge
  xcb-util-keysyms                      0.4.0         h8ee46fc_1            conda-forge
  xcb-util-renderutil                   0.3.9         hd590300_1            conda-forge
  xcb-util-wm                           0.4.1         h8ee46fc_1            conda-forge
  xkeyboard-config                      2.39          hd590300_0            conda-forge
  xorg-fixesproto                       5.0           h7f98852_1002         conda-forge
  xorg-inputproto                       2.3.2         h7f98852_1002         conda-forge
  xorg-kbproto                          1.0.7         h7f98852_1002         conda-forge
  xorg-libice                           1.1.1         hd590300_0            conda-forge
  xorg-libsm                            1.2.4         h7391055_0            conda-forge
  xorg-libx11                           1.8.6         h8ee46fc_0            conda-forge
  xorg-libxau                           1.0.11        hd590300_0            conda-forge
  xorg-libxdmcp                         1.1.3         h7f98852_0            conda-forge
  xorg-libxext                          1.3.4         h0b41bf4_2            conda-forge
  xorg-libxfixes                        5.0.3         h7f98852_1004         conda-forge
  xorg-libxi                            1.7.10        h7f98852_0            conda-forge
  xorg-libxrender                       0.9.11        hd590300_0            conda-forge
  xorg-libxt                            1.3.0         hd590300_1            conda-forge
  xorg-renderproto                      0.11.1        h7f98852_1002         conda-forge
  xorg-xextproto                        7.3.0         h0b41bf4_1003         conda-forge
  xorg-xf86vidmodeproto                 2.3.1         h7f98852_1002         conda-forge
  xorg-xproto                           7.0.31        h7f98852_1007         conda-forge
  xz                                    5.2.6         h166bdaf_0            conda-forge
  yarl                                  1.9.2         py311h459d7ec_0       conda-forge
  zlib                                  1.2.13        hd590300_5            conda-forge
  zstd                                  1.5.2         hfc55251_7            conda-forge

Environment info

libmamba version : 1.4.9
     micromamba version : 1.4.9
           curl version : libcurl/7.88.1 OpenSSL/3.1.1 zlib/1.2.13 zstd/1.5.2 libssh2/1.11.0 nghttp2/1.52.0
     libarchive version : libarchive 3.6.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.2
       envs directories : /home/chan/projects/frag_areas_shapes/.mamba/envs
          package cache : /home/chan/projects/frag_areas_shapes/.mamba/pkgs
                          /home/chan/.mamba/pkgs
            environment : frag_areas_shapes (active)
           env location : /home/chan/projects/frag_areas_shapes/.mamba/envs/frag_areas_shapes
      user config files : /home/chan/.mambarc
 populated config files :
       virtual packages : __unix=0=0
                          __linux=5.15.90=0
                          __glibc=2.38=0
                          __archspec=1=x86_64
                          __cuda=12.2=0
               channels :
       base environment : /home/chan/projects/frag_areas_shapes/.mamba
               platform : linux-64
@carschandler
Copy link
Author

Ah, this may be related to opencv/opencv-python#870

@traversaro
Copy link
Contributor

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.

@jakirkham
Copy link
Member

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

@carschandler
Copy link
Author

carschandler commented Aug 10, 2023

@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...

@traversaro
Copy link
Contributor

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 .

@carschandler
Copy link
Author

@traversaro should I open an issue on the opencv repo?

@traversaro
Copy link
Contributor

@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.

@jomai1
Copy link

jomai1 commented Mar 7, 2024

Hi is there any update to this issue?

@carschandler
Copy link
Author

carschandler commented Mar 7, 2024

Only update I have is that the package in nixpkgs also has this issue: NixOS/nixpkgs#292395

@feelsunbreeze
Copy link

Any updates or workarounds? This is quite annoying.

@mich2k
Copy link

mich2k commented Jun 22, 2024

As of today the only viable solution is a dirty installation with pip in a conda env, am I right?

@carschandler
Copy link
Author

carschandler commented Sep 13, 2024

It seems that this is happening at the setup.py level rather than at CMake level (see here)... I'm not super familiar with CMake but I may be able to figure out how to manually get these copied over by introducing a patch or something.

@Unturned3
Copy link

Unturned3 commented Sep 27, 2024

Any updates to this issue? To this day I still get no autocompletions for opencv installed via conda install conda-forge::opencv. The only way around this seems to be running pip install opencv-python in a conda environment, which is not ideal.

@traversaro
Copy link
Contributor

This comment is interesting: opencv/opencv#26149 . I can check this in the next days, if I do not feel free to ping me, thanks!

@Unturned3
Copy link

Hey @traversaro , did you have a chance to look at this issue?

@traversaro
Copy link
Contributor

Hey @traversaro , did you have a chance to look at this issue?

I did not, so asking for ping was a wise choice. : )

I try to look into this in the next days.

@traversaro
Copy link
Contributor

traversaro commented Oct 4, 2024

I need to double check, but this issue seems related to the https://github.com/opencv/opencv/blob/3901426d8515cd8d1c07654ec7e9e8bc3b51a06f/modules/python/common.cmake#L236 . We pass -DOPENCV_SKIP_PYTHON_LOADER:BOOL=ON in our build, and if that options is enabled, the .pyi files are not installed.

@traversaro
Copy link
Contributor

@carschandler @Unturned3 can you checked if the latest version of the package works for you?

@carschandler
Copy link
Author

carschandler commented Oct 17, 2024

@traversaro working for me!!

Image
Image

Thank you all so much for you work on this! Now I don't have to use the pypi version :)

@traversaro
Copy link
Contributor

Great, thanks for checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
7 participants