conda
conda copied to clipboard
PackagesNotFoundError: The following packages are not available from current channels: -cv2
Hello I am trying to import cv2 in pycharm but it gives an error
while I am using an environment python 3.6
already install opencv through " conda install -c conda-forge
when I list all the pacakages i found
opencv 3.4.1 && opencv-contrib-python 4.1.0
but still, get this error
Collecting package metadata (repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- cv2
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
To install OpenCV in conda you need to install the opencv
package. In Python the import is import cv2
. Can you provide more details on your environment and how you are trying to run OpenCV?
Hi @jjhelmus , I've same error as @khalid5454 .
Collecting package metadata (current_repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- cv2
Current channels:
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
To search for alternate channels that may provide the conda package you're looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Environment: python 3.7.6 platform : osx-64 python version : 3.7.6.final.0 conda version : 4.8.3 conda-build version : 3.18.11 .... (can be added more details regarding to your demand.)
I've been working on an image vision project. I needed to debug a library, so I changed my environment from Jupyter, Colab, Kaggle to PyCharm.
@furkanyy Please re-read my response. You need to install the opencv
package not cv2
.
@jjhelmus thanks for your answer. I've tried opencv
but forget to add here result.
Collecting package metadata (current_repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- opencv-python
Current channels:
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
To search for alternate channels that may provide the conda package you're looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
@furkanyy Can you share the command you are running that causes this error? The following command work for me:
(base) ~$ conda create -n example opencv
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /Users/jhelmus/conda/envs/example
added / updated specs:
- opencv
The following packages will be downloaded:
package | build
---------------------------|-----------------
cairo-1.14.12 | hc4e6be7_4 860 KB defaults
ffmpeg-4.0 | h01ea3c9_0 21.8 MB defaults
fontconfig-2.13.0 | h5d5b041_1 202 KB defaults
graphite2-1.3.13 | h2098e52_0 80 KB defaults
harfbuzz-1.8.8 | hb8d4a28_0 414 KB defaults
hdf5-1.10.2 | hfa1e0ec_1 3.0 MB defaults
jasper-2.0.14 | h636a363_1 654 KB defaults
libopencv-3.4.2 | h7c891bd_1 18.5 MB defaults
libopus-1.3.1 | h1de35cc_0 480 KB defaults
libvpx-1.7.0 | h378b8a2_0 1.3 MB defaults
mkl_random-1.1.1 | py37h959d312_0 284 KB defaults
opencv-3.4.2 | py37h6fd60c2_1 11 KB defaults
pixman-0.38.0 | h1de35cc_0 341 KB defaults
py-opencv-3.4.2 | py37h7c891bd_1 1.0 MB defaults
------------------------------------------------------------
Total: 48.8 MB
The following NEW packages will be INSTALLED:
blas pkgs/main/osx-64::blas-1.0-mkl
bzip2 pkgs/main/osx-64::bzip2-1.0.8-h1de35cc_0
ca-certificates pkgs/main/osx-64::ca-certificates-2020.1.1-0
cairo pkgs/main/osx-64::cairo-1.14.12-hc4e6be7_4
ffmpeg pkgs/main/osx-64::ffmpeg-4.0-h01ea3c9_0
fontconfig pkgs/main/osx-64::fontconfig-2.13.0-h5d5b041_1
freetype pkgs/main/osx-64::freetype-2.9.1-hb4e5f40_0
gettext pkgs/main/osx-64::gettext-0.19.8.1-hb0f4f8b_2
glib pkgs/main/osx-64::glib-2.63.1-h70d4741_1
graphite2 pkgs/main/osx-64::graphite2-1.3.13-h2098e52_0
harfbuzz pkgs/main/osx-64::harfbuzz-1.8.8-hb8d4a28_0
hdf5 pkgs/main/osx-64::hdf5-1.10.2-hfa1e0ec_1
icu pkgs/main/osx-64::icu-58.2-h0a44026_3
intel-openmp pkgs/main/osx-64::intel-openmp-2019.4-233
jasper pkgs/main/osx-64::jasper-2.0.14-h636a363_1
jpeg pkgs/main/osx-64::jpeg-9b-he5867d9_2
libcxx pkgs/main/osx-64::libcxx-10.0.0-1
libedit pkgs/main/osx-64::libedit-3.1.20181209-hb402a30_0
libffi pkgs/main/osx-64::libffi-3.3-h0a44026_1
libgfortran pkgs/main/osx-64::libgfortran-3.0.1-h93005f0_2
libiconv pkgs/main/osx-64::libiconv-1.16-h1de35cc_0
libopencv pkgs/main/osx-64::libopencv-3.4.2-h7c891bd_1
libopus pkgs/main/osx-64::libopus-1.3.1-h1de35cc_0
libpng pkgs/main/osx-64::libpng-1.6.37-ha441bb4_0
libtiff pkgs/main/osx-64::libtiff-4.1.0-hcb84e12_0
libvpx pkgs/main/osx-64::libvpx-1.7.0-h378b8a2_0
libxml2 pkgs/main/osx-64::libxml2-2.9.9-hf6e021a_1
mkl pkgs/main/osx-64::mkl-2019.4-233
mkl-service pkgs/main/osx-64::mkl-service-2.3.0-py37hfbe908c_0
mkl_fft pkgs/main/osx-64::mkl_fft-1.0.15-py37h5e564d8_0
mkl_random pkgs/main/osx-64::mkl_random-1.1.1-py37h959d312_0
ncurses pkgs/main/osx-64::ncurses-6.2-h0a44026_1
numpy pkgs/main/osx-64::numpy-1.18.1-py37h7241aed_0
numpy-base pkgs/main/osx-64::numpy-base-1.18.1-py37h3304bdc_1
opencv pkgs/main/osx-64::opencv-3.4.2-py37h6fd60c2_1
openssl pkgs/main/osx-64::openssl-1.1.1g-h1de35cc_0
pcre pkgs/main/osx-64::pcre-8.43-h0a44026_0
pixman pkgs/main/osx-64::pixman-0.38.0-h1de35cc_0
py-opencv pkgs/main/osx-64::py-opencv-3.4.2-py37h7c891bd_1
python pkgs/main/osx-64::python-3.7.7-hf48f09d_4
readline pkgs/main/osx-64::readline-8.0-h1de35cc_0
six pkgs/main/osx-64::six-1.14.0-py37_0
sqlite pkgs/main/osx-64::sqlite-3.31.1-h5c1f38d_1
tk pkgs/main/osx-64::tk-8.6.8-ha441bb4_0
xz pkgs/main/osx-64::xz-5.2.5-h1de35cc_0
zlib pkgs/main/osx-64::zlib-1.2.11-h1de35cc_3
zstd pkgs/main/osx-64::zstd-1.3.7-h5bba6e5_0
@jjhelmus I tried in anaconda prompt as well and the packages list for me same as you.
`(opencv) C:\Users\zilch>conda install -c conda-forge opencv Collecting package metadata (current_repodata.json): done Solving environment: done
Package Plan
environment location: C:\Users\zilch\anaconda3\envs\opencv
added / updated specs: - opencv
The following packages will be downloaded:
package | build
---------------------------|-----------------
ca-certificates-2020.6.20 | hecda079_0 184 KB conda-forge
certifi-2020.6.20 | py38h32f6830_0 151 KB conda-forge
freetype-2.10.2 | hd328e21_0 490 KB conda-forge
icu-67.1 | h33f27b4_0 16.1 MB conda-forge
intel-openmp-2020.1 | 216 1.6 MB
jpeg-9d | he774522_0 344 KB conda-forge
libblas-3.8.0 | 16_mkl 3.6 MB conda-forge
libcblas-3.8.0 | 16_mkl 3.6 MB conda-forge
libclang-10.0.1 |default_hf44288c_1 22.0 MB conda-forge
liblapack-3.8.0 | 16_mkl 3.6 MB conda-forge
liblapacke-3.8.0 | 16_mkl 3.6 MB conda-forge
libopencv-4.4.0 | py38_2 45.8 MB conda-forge
libpng-1.6.37 | ha81a0f5_2 763 KB conda-forge
libtiff-4.1.0 | h885aae3_6 1020 KB conda-forge
libwebp-base-1.1.0 | hfa6e2cd_3 356 KB conda-forge
lz4-c-1.9.2 | h62dcd97_2 279 KB conda-forge
mkl-2020.1 | 216 99.3 MB
numpy-1.19.1 | py38h72c728b_0 4.9 MB conda-forge
opencv-4.4.0 | py38_2 20 KB conda-forge
openssl-1.1.1h | he774522_0 5.8 MB conda-forge
pip-20.2.3 | py_0 1.1 MB conda-forge
py-opencv-4.4.0 | py38h23f93f0_2 22 KB conda-forge
python-3.8.5 |h60c2a47_9_cpython 18.9 MB conda-forge
python_abi-3.8 | 1_cp38 4 KB conda-forge
qt-5.12.6 | hb2cf2c5_0 106.2 MB conda-forge
setuptools-49.6.0 | py38h32f6830_1 951 KB conda-forge
sqlite-3.33.0 | he774522_0 1.2 MB conda-forge
vc-14.1 | h869be7e_1 6 KB conda-forge
vs2015_runtime-14.16.27012 | h30e32a0_2 2.2 MB conda-forge
wheel-0.35.1 | pyh9f0ad1d_0 29 KB conda-forge
wincertstore-0.2 | py38_1003 13 KB conda-forge
xz-5.2.5 | h62dcd97_1 211 KB conda-forge
zlib-1.2.11 | h62dcd97_1009 126 KB conda-forge
zstd-1.4.5 | h1f3a1b7_2 887 KB conda-forge
------------------------------------------------------------
Total: 344.9 MB
The following NEW packages will be INSTALLED:
ca-certificates conda-forge/win-64::ca-certificates-2020.6.20-hecda079_0 certifi conda-forge/win-64::certifi-2020.6.20-py38h32f6830_0 freetype conda-forge/win-64::freetype-2.10.2-hd328e21_0 icu conda-forge/win-64::icu-67.1-h33f27b4_0 intel-openmp pkgs/main/win-64::intel-openmp-2020.1-216 jpeg conda-forge/win-64::jpeg-9d-he774522_0 libblas conda-forge/win-64::libblas-3.8.0-16_mkl libcblas conda-forge/win-64::libcblas-3.8.0-16_mkl libclang conda-forge/win-64::libclang-10.0.1-default_hf44288c_1 liblapack conda-forge/win-64::liblapack-3.8.0-16_mkl liblapacke conda-forge/win-64::liblapacke-3.8.0-16_mkl libopencv conda-forge/win-64::libopencv-4.4.0-py38_2 libpng conda-forge/win-64::libpng-1.6.37-ha81a0f5_2 libtiff conda-forge/win-64::libtiff-4.1.0-h885aae3_6 libwebp-base conda-forge/win-64::libwebp-base-1.1.0-hfa6e2cd_3 lz4-c conda-forge/win-64::lz4-c-1.9.2-h62dcd97_2 mkl pkgs/main/win-64::mkl-2020.1-216 numpy conda-forge/win-64::numpy-1.19.1-py38h72c728b_0 opencv conda-forge/win-64::opencv-4.4.0-py38_2 openssl conda-forge/win-64::openssl-1.1.1h-he774522_0 pip conda-forge/noarch::pip-20.2.3-py_0 py-opencv conda-forge/win-64::py-opencv-4.4.0-py38h23f93f0_2 python conda-forge/win-64::python-3.8.5-h60c2a47_9_cpython python_abi conda-forge/win-64::python_abi-3.8-1_cp38 qt conda-forge/win-64::qt-5.12.6-hb2cf2c5_0 setuptools conda-forge/win-64::setuptools-49.6.0-py38h32f6830_1 sqlite conda-forge/win-64::sqlite-3.33.0-he774522_0 vc conda-forge/win-64::vc-14.1-h869be7e_1 vs2015_runtime conda-forge/win-64::vs2015_runtime-14.16.27012-h30e32a0_2 wheel conda-forge/noarch::wheel-0.35.1-pyh9f0ad1d_0 wincertstore conda-forge/win-64::wincertstore-0.2-py38_1003 xz conda-forge/win-64::xz-5.2.5-h62dcd97_1 zlib conda-forge/win-64::zlib-1.2.11-h62dcd97_1009 zstd conda-forge/win-64::zstd-1.4.5-h1f3a1b7_2
`
But when I import cv2
in spyder, I face the following error.
ModuleNotFoundError: No module named 'opencv'
And I get this in anaconda prompt `(opencv) C:\Users\zilch>conda search cv2 Loading channels: done No match found for: cv2. Search: cv2
PackagesNotFoundError: The following packages are not available from current channels:
- cv2
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.`
Help me to solve this issue.
@ZilChaudhary Any update on this issue? I am still stuck here too.
Did anyone slove this error ?
I fix this error by using pip instead of conda as a comand in anconda terminal . 'pip install opencv' instead of 'conda install opencv'
I fix this error by using 'conda install opencv' instead of 'conda install opencv-python'. I'm still confused.
Hi there, thank you for your contribution!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.
If you would like this issue to remain open please:
- Verify that you can still reproduce the issue at hand
- Comment that the issue is still reproducible and include: - What OS and version you reproduced the issue on - What steps you followed to reproduce the issue
NOTE: If this issue was closed prematurely, please leave a comment.
Thanks!
i used pip install opencv-python==4.2.0.32 -i https://pypi.tuna.tsinghua.edu.cn/simple
and it workds for me.
The command pip install opencv-python==4.2.0.32 -i https://pypi.tuna.tsinghua.edu.cn/simple
works for me.
conda install -c conda-forge opencv worked well for me..
I run the command conda install opencv
in anaconda prompt and it works.
conda install -c conda-forge opencv worked well for me..
it works for me