conda-forge / opencv-feedstock

A conda-smithy repository for opencv.
BSD 3-Clause "New" or "Revised" License
62 stars 59 forks source link

package is incompatbile with nvidia and pytorch channel #353

Closed vipcxj closed 3 months ago

vipcxj commented 1 year ago

Solution to issue cannot be found in the documentation.

Issue

I install the opencv using mamba, and found I just install a empty package. I can import cv2 in vscode, but the package has nothing. It just a empty package. I use cv2.Mat, but python runtime tell me cv2 has no attribute Mat. I check the folder the opencv is installed. I think it should be 'opencv_python-4.7.0.dist-info'. There is two file in it. 'INSTALLER' and 'METADATA' Then I uninstall it and install opencv-python using pip. All works, and I found there are a lot of files in 'opencv_python-4.7.0.dist-info', And there is another folder named cv2 which not exist for conda package.

Installed packages

```shell # packages in environment at C:\Users\vipcx\mambaforge\envs\auto-fishing: # # Name Version Build Channel alembic 1.9.4 pyhd8ed1ab_0 conda-forge aom 3.5.0 h63175ca_0 conda-forge appdirs 1.4.4 pyh9f0ad1d_0 conda-forge argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge argon2-cffi-bindings 21.2.0 py310h8d17308_3 conda-forge basemap 1.3.6 py310h791411c_2 conda-forge basemap-data 1.3.2 pyhd8ed1ab_2 conda-forge bcrypt 3.2.2 py310h8d17308_1 conda-forge bidict 0.22.1 pyhd8ed1ab_0 conda-forge blas 2.116 mkl conda-forge blas-devel 3.9.0 16_win64_mkl conda-forge blinker 1.5 pyhd8ed1ab_0 conda-forge brotli 1.0.9 hcfcfb64_8 conda-forge brotli-bin 1.0.9 hcfcfb64_8 conda-forge brotlipy 0.7.0 py310h8d17308_1005 conda-forge bzip2 1.0.8 h8ffe710_4 conda-forge ca-certificates 2022.12.7 h5b45459_0 conda-forge cachetools 5.3.0 pyhd8ed1ab_0 conda-forge cairo 1.16.0 hd694305_1014 conda-forge cartopy 0.21.1 py310h5081e89_0 conda-forge certifi 2022.12.7 pyhd8ed1ab_0 conda-forge cffi 1.15.1 py310h628cb3f_3 conda-forge cftime 1.6.2 py310h9b08ddd_1 conda-forge chameleon 3.9.1 pyhd8ed1ab_0 conda-forge charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge click 8.1.3 win_pyhd8ed1ab_2 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge contourpy 1.0.7 py310h232114e_0 conda-forge cryptography 39.0.1 py310h6e82f81_0 conda-forge cuda 11.7.1 0 nvidia cuda-cccl 11.7.91 0 nvidia cuda-command-line-tools 11.7.1 0 nvidia cuda-compiler 11.7.1 0 nvidia cuda-cudart 11.7.99 0 nvidia cuda-cudart-dev 11.7.99 0 nvidia cuda-cuobjdump 11.7.91 0 nvidia cuda-cupti 11.7.101 0 nvidia cuda-cuxxfilt 11.7.91 0 nvidia cuda-demo-suite 12.1.55 0 nvidia cuda-documentation 12.1.55 0 nvidia cuda-libraries 11.7.1 0 nvidia cuda-libraries-dev 11.7.1 0 nvidia cuda-memcheck 11.8.86 0 nvidia cuda-nsight-compute 12.1.0 0 nvidia cuda-nvcc 11.7.99 0 nvidia cuda-nvdisasm 12.1.55 0 nvidia cuda-nvml-dev 11.7.91 0 nvidia cuda-nvprof 12.1.55 0 nvidia cuda-nvprune 11.7.91 0 nvidia cuda-nvrtc 11.7.99 0 nvidia cuda-nvrtc-dev 11.7.99 0 nvidia cuda-nvtx 11.7.91 0 nvidia cuda-nvvp 12.1.55 0 nvidia cuda-runtime 11.7.1 0 nvidia cuda-sanitizer-api 12.1.55 0 nvidia cuda-toolkit 11.7.1 0 nvidia cuda-tools 11.7.1 0 nvidia cuda-visual-tools 11.7.1 0 nvidia curl 7.88.1 h68f0423_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge dataclasses 0.8 pyhc8e2a94_3 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge execnet 1.9.0 pyhd8ed1ab_0 conda-forge expat 2.5.0 h1537add_0 conda-forge fastkml 0.11 py_1 conda-forge ffmpeg 5.1.2 gpl_h5b1d025_106 conda-forge flask 2.2.3 pyhd8ed1ab_0 conda-forge flask-cors 3.0.10 pyhd8ed1ab_0 conda-forge flask-httpauth 4.7.0 pyhd8ed1ab_0 conda-forge flask-mail 0.9.1 py_2 conda-forge flask-migrate 4.0.4 pyhd8ed1ab_0 conda-forge flask-socketio 5.1.0 pyhd8ed1ab_0 conda-forge flask-sqlalchemy 3.0.3 pyhd8ed1ab_0 conda-forge flit-core 3.8.0 pyhd8ed1ab_0 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 hbde0cde_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge fonttools 4.38.0 py310h8d17308_1 conda-forge freeglut 3.2.2 h0e60522_1 conda-forge freetype 2.12.1 h546665d_1 conda-forge fs 2.4.15 pyhd8ed1ab_0 conda-forge fs.sshfs 1.0.1 pyhd8ed1ab_0 conda-forge fs.webdavfs 0.4.2 pyhd8ed1ab_0 conda-forge fs_filepicker 0.3.7 pyhd8ed1ab_5 conda-forge future 0.18.3 pyhd8ed1ab_0 conda-forge geos 3.11.1 h1537add_0 conda-forge gettext 0.21.1 h5728263_0 conda-forge git 2.39.2 h57928b3_0 conda-forge gitdb 4.0.10 pyhd8ed1ab_0 conda-forge gitpython 3.1.31 pyhd8ed1ab_0 conda-forge glib 2.74.1 h12be248_1 conda-forge glib-tools 2.74.1 h12be248_1 conda-forge gpxpy 1.5.0 pyhd8ed1ab_0 conda-forge graphite2 1.3.13 1000 conda-forge greenlet 2.0.2 py310h00ffb61_0 conda-forge gst-plugins-base 1.21.3 h001b923_1 conda-forge gstreamer 1.21.3 h6b5321d_1 conda-forge harfbuzz 6.0.0 he256f1b_0 conda-forge hdf4 4.2.15 h1b1b6ef_5 conda-forge hdf5 1.12.2 nompi_h57737ce_101 conda-forge humanfriendly 10.0 py310h5588dad_4 conda-forge icu 70.1 h0e60522_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge importlib-metadata 6.0.0 pyha770c72_0 conda-forge importlib_resources 5.12.0 pyhd8ed1ab_0 conda-forge intel-openmp 2023.0.0 h57928b3_25922 conda-forge isodate 0.6.1 pyhd8ed1ab_0 conda-forge itsdangerous 2.0.1 pyhd8ed1ab_0 conda-forge jasper 2.0.33 hc2e4405_1 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge jpeg 9e hcfcfb64_3 conda-forge jplephem 2.18 pyh78acc04_0 conda-forge keyboard 0.13.5 py310h5588dad_2 conda-forge kiwisolver 1.4.4 py310h232114e_1 conda-forge krb5 1.20.1 heb0366b_0 conda-forge lcms2 2.14 ha5c8aab_1 conda-forge lerc 4.0.0 h63175ca_0 conda-forge libaec 1.0.6 h63175ca_1 conda-forge libblas 3.9.0 16_win64_mkl conda-forge libbrotlicommon 1.0.9 hcfcfb64_8 conda-forge libbrotlidec 1.0.9 hcfcfb64_8 conda-forge libbrotlienc 1.0.9 hcfcfb64_8 conda-forge libcblas 3.9.0 16_win64_mkl conda-forge libclang 15.0.7 default_h77d9078_1 conda-forge libclang13 15.0.7 default_h77d9078_1 conda-forge libcublas 11.10.3.66 0 nvidia libcublas-dev 11.10.3.66 0 nvidia libcufft 10.7.2.124 0 nvidia libcufft-dev 10.7.2.124 0 nvidia libcurand 10.3.2.56 0 nvidia libcurand-dev 10.3.2.56 0 nvidia libcurl 7.88.1 h68f0423_0 conda-forge libcusolver 11.4.0.1 0 nvidia libcusolver-dev 11.4.0.1 0 nvidia libcusparse 11.7.4.91 0 nvidia libcusparse-dev 11.7.4.91 0 nvidia libdeflate 1.17 hcfcfb64_0 conda-forge libffi 3.4.2 h8ffe710_5 conda-forge libglib 2.74.1 he8f3873_1 conda-forge libhwloc 2.9.0 h51c2c0f_0 conda-forge libiconv 1.17 h8ffe710_0 conda-forge liblapack 3.9.0 16_win64_mkl conda-forge liblapacke 3.9.0 16_win64_mkl conda-forge libnetcdf 4.9.1 nompi_hc41bf00_101 conda-forge libnpp 11.7.4.75 0 nvidia libnpp-dev 11.7.4.75 0 nvidia libnvjpeg 11.8.0.2 0 nvidia libnvjpeg-dev 11.8.0.2 0 nvidia libogg 1.3.4 h8ffe710_1 conda-forge libopencv 4.7.0 py310h90026ac_1 conda-forge libopus 1.3.1 h8ffe710_1 conda-forge libpng 1.6.39 h19919ed_0 conda-forge libpq 15.2 ha9684e8_0 conda-forge libprotobuf 3.21.12 h12be248_0 conda-forge libsqlite 3.40.0 hcfcfb64_0 conda-forge libssh2 1.10.0 h9a1e1f7_3 conda-forge libtiff 4.5.0 hf8721a0_2 conda-forge libuv 1.44.2 h8ffe710_0 conda-forge libvorbis 1.3.7 h0e60522_0 conda-forge libwebp 1.2.4 hcfcfb64_1 conda-forge libwebp-base 1.2.4 h8ffe710_0 conda-forge libxcb 1.13 hcd874cb_1004 conda-forge libxml2 2.10.3 hc3477c8_0 conda-forge libxslt 1.1.37 h0192164_0 conda-forge libzip 1.9.2 h519de47_1 conda-forge libzlib 1.2.13 hcfcfb64_4 conda-forge lxml 4.9.2 py310hc0e5b84_0 conda-forge m2w64-gcc-libgfortran 5.3.0 6 conda-forge m2w64-gcc-libs 5.3.0 7 conda-forge m2w64-gcc-libs-core 5.3.0 7 conda-forge m2w64-gmp 6.1.0 2 conda-forge m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge mako 1.2.4 pyhd8ed1ab_0 conda-forge markdown 3.4.1 pyhd8ed1ab_0 conda-forge markupsafe 2.1.2 py310h8d17308_0 conda-forge matplotlib 3.6.3 py310h5588dad_0 conda-forge matplotlib-base 3.6.3 py310h51140c5_0 conda-forge menuinst 1.4.19 py310h5588dad_1 conda-forge metpy 1.4.0 pyhd8ed1ab_0 conda-forge mkl 2022.1.0 h6a75c08_874 conda-forge mkl-devel 2022.1.0 h57928b3_875 conda-forge mkl-include 2022.1.0 h6a75c08_874 conda-forge mss 6.2.0 py310h5588dad_0 conda-forge msys2-conda-epoch 20160418 1 conda-forge multidict 6.0.4 py310h8d17308_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge netcdf4 1.6.2 nompi_py310hf10f414_101 conda-forge nsight-compute 2023.1.0.15 0 nvidia numpy 1.24.2 py310hd02465a_0 conda-forge opencv 4.7.0 py310h5588dad_1 conda-forge openh264 2.3.1 h63175ca_2 conda-forge openjpeg 2.5.0 ha2aaf27_2 conda-forge openssl 3.0.8 hcfcfb64_0 conda-forge owslib 0.28.1 pyhd8ed1ab_0 conda-forge packaging 23.0 pyhd8ed1ab_0 conda-forge pandas 1.5.3 py310h1c4a608_0 conda-forge paramiko 2.12.0 pyhd8ed1ab_0 conda-forge passlib 1.7.4 pyh9f0ad1d_0 conda-forge pcre2 10.40 h17e33f8_0 conda-forge pillow 9.4.0 py310hdbb7713_1 conda-forge pint 0.20.1 pyhd8ed1ab_0 conda-forge pip 23.0.1 pyhd8ed1ab_0 conda-forge pixman 0.40.0 h8ffe710_0 conda-forge platformdirs 3.0.0 pyhd8ed1ab_0 conda-forge ply 3.11 py_1 conda-forge pooch 1.7.0 pyhd8ed1ab_0 conda-forge proj 9.1.1 heca977f_2 conda-forge property-cached 1.6.4 py_0 conda-forge psycopg2 2.9.3 py310h709a2f1_2 conda-forge pthread-stubs 0.4 hcd874cb_1001 conda-forge pthreads-win32 2.9.1 hfa6e2cd_3 conda-forge py-opencv 4.7.0 py310hbbfc1a7_1 conda-forge pycountry 22.3.5 pyhd8ed1ab_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pygeoif 1.0.0 pyhd8ed1ab_0 conda-forge pymysql 1.0.2 pyhd8ed1ab_0 conda-forge pynacl 1.5.0 py310h635b8f1_2 conda-forge pyopenssl 23.0.0 pyhd8ed1ab_0 conda-forge pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge pyproj 3.4.1 py310hcdd211a_1 conda-forge pyqt 5.15.7 py310h1fd54f2_3 conda-forge pyqt5-sip 12.11.0 py310h00ffb61_3 conda-forge pyreadline3 3.4.1 py310h5588dad_2 conda-forge pyshp 2.3.1 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyh0701188_6 conda-forge python 3.10.9 h4de0772_0_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-engineio 4.3.4 pyhd8ed1ab_0 conda-forge python-mss 7.0.1 pyhd8ed1ab_0 conda-forge python-socketio 5.7.2 pyhd8ed1ab_0 conda-forge python_abi 3.10 3_cp310 conda-forge pytorch 1.13.1 py3.10_cuda11.7_cudnn8_0 pytorch pytorch-cuda 11.7 h67b0de4_1 pytorch pytorch-mutex 1.0 cuda pytorch pytz 2022.7.1 pyhd8ed1ab_0 conda-forge pyyaml 6.0 py310h8d17308_5 conda-forge qt 5.15.6 h91493d7_0 conda-forge qt-main 5.15.6 h9580fe5_6 conda-forge qt-webengine 5.15.4 h0bdee70_3 conda-forge requests 2.28.2 pyhd8ed1ab_0 conda-forge scipy 1.10.1 py310h578b7cb_0 conda-forge setuptools 67.4.0 pyhd8ed1ab_0 conda-forge sgp4 2.21 py310h220cb41_2 conda-forge shapely 2.0.1 py310h8c82734_0 conda-forge sip 6.7.7 py310h00ffb61_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge skyfield 1.45 pyh1a96a4e_0 conda-forge skyfield-data 4.0.0 pyhd8ed1ab_0 conda-forge smmap 3.0.5 pyh44b312d_0 conda-forge sqlalchemy 2.0.4 py310h8d17308_0 conda-forge sqlite 3.40.0 hcfcfb64_0 conda-forge svt-av1 1.4.1 h63175ca_0 conda-forge tbb 2021.8.0 h91493d7_0 conda-forge tk 8.6.12 h8ffe710_0 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge torchaudio 0.13.1 pypi_0 pypi torchvision 0.14.1 pypi_0 pypi tornado 6.2 py310h8d17308_1 conda-forge traitlets 5.9.0 pyhd8ed1ab_0 conda-forge typing-extensions 4.4.0 hd8ed1ab_0 conda-forge typing_extensions 4.4.0 pyha770c72_0 conda-forge tzdata 2022g h191b570_0 conda-forge ucrt 10.0.22621.0 h57928b3_0 conda-forge unicodecsv 0.14.1 py_1 conda-forge unicodedata2 15.0.0 py310h8d17308_0 conda-forge urllib3 1.26.14 pyhd8ed1ab_0 conda-forge validate_email 1.3 py_3 conda-forge vc 14.3 hb6edc58_10 conda-forge vs2015_runtime 14.34.31931 h4c5c07a_10 conda-forge webdavclient3 3.14.5 pyhd8ed1ab_1 conda-forge websocket-client 1.5.1 pyhd8ed1ab_0 conda-forge werkzeug 2.2.3 pyhd8ed1ab_0 conda-forge wheel 0.38.4 pyhd8ed1ab_0 conda-forge win_inet_pton 1.1.0 pyhd8ed1ab_6 conda-forge x264 1!164.3095 h8ffe710_2 conda-forge x265 3.5 h2d74725_3 conda-forge xarray 2023.2.0 pyhd8ed1ab_0 conda-forge xorg-libxau 1.0.9 hcd874cb_0 conda-forge xorg-libxdmcp 1.1.3 hcd874cb_0 conda-forge xstatic 1.0.2 pyh9f0ad1d_0 conda-forge xstatic-bootstrap 4.5.3.1 pyhd3deb0d_0 conda-forge xstatic-jquery 3.5.1.1 py310h5588dad_3 conda-forge xz 5.2.6 h8d14728_0 conda-forge yaml 0.2.5 h8ffe710_2 conda-forge zipp 3.15.0 pyhd8ed1ab_0 conda-forge zlib 1.2.13 hcfcfb64_4 conda-forge zstd 1.5.2 h12be248_6 conda-forge ```

Environment info

__    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (1.1.0) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████

     active environment : auto-fishing
    active env location : C:\Users\vipcx\mambaforge\envs\auto-fishing
            shell level : 2
       user config file : C:\Users\vipcx\.condarc
 populated config files : C:\Users\vipcx\mambaforge\.condarc
                          C:\Users\vipcx\.condarc
          conda version : 22.11.1
    conda-build version : not installed
         python version : 3.10.9.final.0
       virtual packages : __archspec=1=x86_64
                          __cuda=12.0=0
                          __win=0=0
       base environment : C:\Users\vipcx\mambaforge  (writable)
      conda av data dir : C:\Users\vipcx\mambaforge\etc\conda
  conda av metadata url : None
           channel URLs : https://mirrors.bfsu.edu.cn/anaconda/pkgs/main/win-64
                          https://mirrors.bfsu.edu.cn/anaconda/pkgs/main/noarch
                          https://mirrors.bfsu.edu.cn/anaconda/pkgs/r/win-64
                          https://mirrors.bfsu.edu.cn/anaconda/pkgs/r/noarch
                          https://mirrors.bfsu.edu.cn/anaconda/pkgs/msys2/win-64
                          https://mirrors.bfsu.edu.cn/anaconda/pkgs/msys2/noarch
                          https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/win-64
                          https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/noarch
          package cache : C:\Users\vipcx\mambaforge\pkgs
                          C:\Users\vipcx\.conda\pkgs
                          C:\Users\vipcx\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\vipcx\mambaforge\envs
                          C:\Users\vipcx\.conda\envs
                          C:\Users\vipcx\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/22.11.1 requests/2.28.2 CPython/3.10.9 Windows/10 Windows/10.0.19044
          administrator : False
             netrc file : None
           offline mode : False
hmaarrfk commented 1 year ago

Thanks for providing a detailed report.

I don't have a windows computer handy. Could you try to recreate the issue in a new environment where things from Nvidia and pytorch are not installed.

To troubleshoot. It is often good to find the cause of the problem.

It could be that they are installing some incompatible dll, or that our package is in fact broken. Either way, an environment with opencv and python only would really help troubleshoot

vipcxj commented 1 year ago

@hmaarrfk I recently reinstalled my python environment, so I also reinstalled opencv, the problem remains, I used centos7. Here is my reproduction steps:

mamba create -n my-env-name python=3.10
mamba install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
mamba install -c conda-forge torchinfo
mamba install -c conda-forge opencv

No error output. But when I run my python file, this error show:

module 'cv2' has no attribute 'Mat'

Of course, in the vscode, I can't jump to the source file by click the cv2 word.

This is my installed packages list at this moment:

``` (sanrong) [root@ecs-ai sanrong]# mamba list # packages in environment at /root/mambaforge/envs/sanrong: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_gnu conda-forge alsa-lib 1.2.8 h166bdaf_0 conda-forge aom 3.5.0 h27087fc_0 conda-forge attr 2.5.1 h166bdaf_1 conda-forge blas 1.0 mkl conda-forge brotlipy 0.7.0 py310h5764c6d_1005 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge c-ares 1.18.1 h7f98852_0 conda-forge ca-certificates 2022.12.7 ha878542_0 conda-forge cairo 1.16.0 ha61ee94_1014 conda-forge certifi 2022.12.7 pyhd8ed1ab_0 conda-forge cffi 1.15.1 py310h255011f_3 conda-forge charset-normalizer 3.1.0 pyhd8ed1ab_0 conda-forge cryptography 40.0.1 py310h34c0648_0 conda-forge cuda-cudart 11.8.89 0 nvidia cuda-cupti 11.8.87 0 nvidia cuda-libraries 11.8.0 0 nvidia cuda-nvrtc 11.8.89 0 nvidia cuda-nvtx 11.8.86 0 nvidia cuda-runtime 11.8.0 0 nvidia dbus 1.13.6 h5008d03_3 conda-forge expat 2.5.0 hcb278e6_1 conda-forge ffmpeg 5.1.2 gpl_h8dda1f0_106 conda-forge fftw 3.3.10 nompi_hc118613_107 conda-forge filelock 3.11.0 pyhd8ed1ab_0 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 freeglut 3.2.2 h9c3ff4c_1 conda-forge freetype 2.12.1 hca18f0e_1 conda-forge gettext 0.21.1 h27087fc_0 conda-forge glib 2.74.1 h6239696_1 conda-forge glib-tools 2.74.1 h6239696_1 conda-forge gmp 6.2.1 h58526e2_0 conda-forge gmpy2 2.1.2 py310h3ec546c_1 conda-forge gnutls 3.7.8 hf3e180e_0 conda-forge graphite2 1.3.13 h58526e2_1001 conda-forge gst-plugins-base 1.22.0 h4243ec0_2 conda-forge gstreamer 1.22.0 h25f0c4b_2 conda-forge gstreamer-orc 0.4.33 h166bdaf_0 conda-forge harfbuzz 6.0.0 h8e241bc_0 conda-forge hdf5 1.14.0 nompi_hb72d44e_103 conda-forge icu 70.1 h27087fc_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge intel-openmp 2023.0.0 h9e868ea_25371 defaults jack 1.9.22 h11f4161_0 conda-forge jasper 2.0.33 h0ff4b12_1 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge jpeg 9e h0b41bf4_3 conda-forge keyutils 1.6.1 h166bdaf_0 conda-forge krb5 1.20.1 h81ceb04_0 conda-forge lame 3.100 h166bdaf_1003 conda-forge lcms2 2.15 hfd0df8a_0 conda-forge ld_impl_linux-64 2.40 h41732ed_0 conda-forge lerc 4.0.0 h27087fc_0 conda-forge libaec 1.0.6 hcb278e6_1 conda-forge libblas 3.9.0 1_h86c2bf4_netlib conda-forge libcap 2.67 he9d0100_0 conda-forge libcblas 3.9.0 5_h92ddd45_netlib conda-forge libclang 15.0.7 default_had23c3d_1 conda-forge libclang13 15.0.7 default_h3e3d535_1 conda-forge libcublas 11.11.3.6 0 nvidia libcufft 10.9.0.58 0 nvidia libcufile 1.6.0.25 0 nvidia libcups 2.3.3 h36d4200_3 conda-forge libcurand 10.3.2.56 0 nvidia libcurl 7.88.1 hdc1c0ab_1 conda-forge libcusolver 11.4.1.48 0 nvidia libcusparse 11.7.5.86 0 nvidia libdb 6.2.32 h9c3ff4c_0 conda-forge libdeflate 1.17 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.10 h28343ad_4 conda-forge libexpat 2.5.0 hcb278e6_1 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libflac 1.4.2 h27087fc_0 conda-forge libgcc-ng 12.2.0 h65d4601_19 conda-forge libgcrypt 1.10.1 h166bdaf_0 conda-forge libgfortran-ng 12.2.0 h69a702a_19 conda-forge libgfortran5 12.2.0 h337968e_19 conda-forge libglib 2.74.1 h606061b_1 conda-forge libglu 9.0.0 he1b5a44_1001 conda-forge libgomp 12.2.0 h65d4601_19 conda-forge libgpg-error 1.46 h620e276_0 conda-forge libhwloc 2.9.0 hd6dc26d_0 conda-forge libiconv 1.17 h166bdaf_0 conda-forge libidn2 2.3.4 h166bdaf_0 conda-forge liblapack 3.9.0 5_h92ddd45_netlib conda-forge liblapacke 3.9.0 5_h92ddd45_netlib conda-forge libllvm15 15.0.7 hadd5161_1 conda-forge libnghttp2 1.52.0 h61bc06f_0 conda-forge libnpp 11.8.0.86 0 nvidia libnsl 2.0.0 h7f98852_0 conda-forge libnvjpeg 11.9.0.86 0 nvidia libogg 1.3.4 h7f98852_1 conda-forge libopencv 4.7.0 py310hb48cf42_1 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.2 hb675445_0 conda-forge libprotobuf 3.21.12 h3eb15da_0 conda-forge libsndfile 1.2.0 hb75c966_0 conda-forge libsqlite 3.40.0 h753d276_0 conda-forge libssh2 1.10.0 hf14f497_3 conda-forge libstdcxx-ng 12.2.0 h46fd767_19 conda-forge libsystemd0 253 h8c4010b_1 conda-forge libtasn1 4.19.0 h166bdaf_0 conda-forge libtiff 4.5.0 h6adf6a1_2 conda-forge libtool 2.4.7 h27087fc_0 conda-forge libudev1 253 h0b41bf4_1 conda-forge libunistring 0.9.10 h7f98852_0 conda-forge libuuid 2.38.1 h0b41bf4_0 conda-forge libva 2.18.0 h0b41bf4_0 conda-forge libvorbis 1.3.7 h9c3ff4c_0 conda-forge libvpx 1.11.0 h9c3ff4c_3 conda-forge libwebp-base 1.3.0 h0b41bf4_0 conda-forge libxcb 1.13 h7f98852_1004 conda-forge libxkbcommon 1.5.0 h79f4944_1 conda-forge libxml2 2.10.3 hca2bb57_4 conda-forge libzlib 1.2.13 h166bdaf_4 conda-forge lz4-c 1.9.4 hcb278e6_0 conda-forge markupsafe 2.1.2 py310h1fa729e_0 conda-forge mkl 2023.0.0 h6d00ec8_25399 defaults mpc 1.3.1 hfe3b2da_0 conda-forge mpfr 4.2.0 hb012696_0 conda-forge mpg123 1.31.3 hcb278e6_0 conda-forge mpmath 1.3.0 pyhd8ed1ab_0 conda-forge mysql-common 8.0.32 ha901b37_1 conda-forge mysql-libs 8.0.32 hd7da12d_1 conda-forge ncurses 6.3 h27087fc_1 conda-forge nettle 3.8.1 hc379101_1 conda-forge networkx 3.1 pyhd8ed1ab_0 conda-forge nspr 4.35 h27087fc_0 conda-forge nss 3.89 he45b914_0 conda-forge numpy 1.24.2 py310h8deb116_0 conda-forge opencv 4.7.0 py310hff52083_1 conda-forge openh264 2.3.1 hcb278e6_2 conda-forge openjpeg 2.5.0 hfec8fc6_2 conda-forge openssl 3.1.0 h0b41bf4_0 conda-forge p11-kit 0.24.1 hc5aa10d_0 conda-forge pcre2 10.40 hc3806b6_0 conda-forge pillow 9.4.0 py310h023d228_1 conda-forge pip 23.0.1 pyhd8ed1ab_0 conda-forge pixman 0.40.0 h36c2ea0_0 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge pulseaudio 16.1 hcb278e6_3 conda-forge pulseaudio-client 16.1 h5195f5e_3 conda-forge pulseaudio-daemon 16.1 ha8d29e2_3 conda-forge py-opencv 4.7.0 py310hfdc917e_1 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pyopenssl 23.1.1 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge python 3.10.10 he550d4f_0_cpython conda-forge python_abi 3.10 3_cp310 conda-forge pytorch 2.0.0 py3.10_cuda11.8_cudnn8.7.0_0 pytorch pytorch-cuda 11.8 h7e8668a_3 pytorch pytorch-mutex 1.0 cuda pytorch qt-main 5.15.8 h5d23da1_6 conda-forge readline 8.2 h8228510_1 conda-forge requests 2.28.2 pyhd8ed1ab_1 conda-forge setuptools 67.6.1 pyhd8ed1ab_0 conda-forge svt-av1 1.4.1 hcb278e6_0 conda-forge sympy 1.11.1 pypyh9d50eac_103 conda-forge tbb 2021.8.0 hf52228f_0 conda-forge tk 8.6.12 h27826a3_0 conda-forge torchaudio 2.0.0 py310_cu118 pytorch torchinfo 1.7.2 pyhd8ed1ab_0 conda-forge torchtriton 2.0.0 py310 pytorch torchvision 0.15.0 py310_cu118 pytorch typing_extensions 4.5.0 pyha770c72_0 conda-forge tzdata 2023c h71feb2d_0 conda-forge urllib3 1.26.15 pyhd8ed1ab_0 conda-forge wheel 0.40.0 pyhd8ed1ab_0 conda-forge x264 1!164.3095 h166bdaf_2 conda-forge x265 3.5 h924138e_3 conda-forge xcb-util 0.4.0 h516909a_0 conda-forge xcb-util-image 0.4.0 h166bdaf_0 conda-forge xcb-util-keysyms 0.4.0 h516909a_0 conda-forge xcb-util-renderutil 0.3.9 h166bdaf_0 conda-forge xcb-util-wm 0.4.1 h516909a_0 conda-forge xkeyboard-config 2.38 h0b41bf4_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.0.10 h7f98852_0 conda-forge xorg-libsm 1.2.3 hd9c2040_1000 conda-forge xorg-libx11 1.8.4 h0b41bf4_0 conda-forge xorg-libxau 1.0.9 h7f98852_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.10 h7f98852_1003 conda-forge xorg-renderproto 0.11.1 h7f98852_1002 conda-forge xorg-xextproto 7.3.0 h0b41bf4_1003 conda-forge xorg-xproto 7.0.31 h7f98852_1007 conda-forge xz 5.2.6 h166bdaf_0 conda-forge zlib 1.2.13 h166bdaf_4 conda-forge zstd 1.5.2 h3eb15da_6 conda-forge ```

I try to use conda instead of mamba, the problem still exists. But I can uninstall the opencv using conda and I can't uninstall the opencv using mamba. Here is the related link

hmaarrfk commented 1 year ago

Sorry i haven't been able to get back to you.

Generally speaking.....

mamba create -n my-env-name python=3.10
mamba install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
mamba install -c conda-forge torchinfo
mamba install -c conda-forge opencv

is pretty "unsupported" and definitely "unsupported" if the subject of the issue is "I think the package is broken".

The reason is that we are are basically incompatible with the default channel, and to my knowlege, pytorch and nvidia aim to be compatible with the default channel (from anaconda).

If the title was: "Improve compatibility with XXX channel" it would be a little different.

On our CIs, we tend to test with

mamba create -n my-env-name python=3.10 opencv --channel conda-forge --override-channels

If you can recreate your issue with that, then we can attempt to fix.

The general issue is that

all try to use hardware acceleration and the "newest" instruction sets. Their strategies differ in compatibility, especially when you install them from different channels (which different compatibility guarantees).

On linux, you can install pytorch from conda-forge, so maybe try that?

hmaarrfk commented 1 year ago

If the title was: "Improve compatibility with XXX channel" it would be a little different.

It would be a little different since my "assumption" would be that your knowledge of software integration would enable you to help craft a path toward this integration.

hmaarrfk commented 3 months ago

Generally speaking, i'm closing this as it is at the intersection of compatibility with the defaults channel, and this is not a workflow that we can tackle at a feedstock level.

If this is critical to your workflow, then please open a issue in a more central location conda-forge.github.io is one place that is appropropriate