Can't install OpenCV to PyCharm

Hi.

First of all, I downloaded Anaconda for PyCharm.
Here is my versions:

[lesia@lesiax ~]$ python --version
Python 3.8.3
[lesia@lesiax ~]$ pip --version
pip 20.1.1 from /usr/lib/python3.8/site-packages/pip (python 3.8)
[lesia@lesiax ~]$ conda --version
conda 4.8.3

Conda info:

[lesia@lesiax ~]$ conda info

     active environment : None
            shell level : 0
       user config file : /home/lesia/.condarc
 populated config files : /home/lesia/.condarc
          conda version : 4.8.3
    conda-build version : 3.18.11
         python version : 3.8.5.final.0
       virtual packages : __glibc=2.31
       base environment : /home/lesia/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/lesia/anaconda3/pkgs
                          /home/lesia/.conda/pkgs
       envs directories : /home/lesia/anaconda3/envs
                          /home/lesia/.conda/envs
               platform : linux-64
             user-agent : conda/4.8.3 requests/2.24.0 CPython/3.8.5 Linux/5.6.19-2-MANJARO manjaro/20.0.3 glibc/2.31
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

Conda list:

[lesia@lesiax ~]$ conda list
# packages in environment at /home/lesia/anaconda3:
#
# Name                    Version                   Build  Channel
_anaconda_depends         2020.07                  py38_0  
_ipyw_jlab_nb_ext_conf    0.1.0                    py38_0  
_libgcc_mutex             0.1                        main  
alabaster                 0.7.12                     py_0  
anaconda                  custom                   py38_1  
anaconda-client           1.7.2                    py38_0  
anaconda-navigator        1.9.12                   py38_1  
anaconda-project          0.8.4                      py_0  
argh                      0.26.2                   py38_0  
asn1crypto                1.3.0                    py38_0  
astroid                   2.4.2                    py38_0  
astropy                   4.0.1.post1      py38h7b6447c_1  
atomicwrites              1.4.0                      py_0  
attrs                     19.3.0                     py_0  
autopep8                  1.5.3                      py_0  
babel                     2.8.0                      py_0  
backcall                  0.2.0                      py_0  
backports                 1.0                        py_2  
backports.functools_lru_cache 1.6.1                      py_0  
backports.shutil_get_terminal_size 1.0.0                    py38_2  
backports.tempfile        1.0                        py_1  
backports.weakref         1.0.post1                  py_1  
beautifulsoup4            4.9.1                    py38_0  
bitarray                  1.4.0            py38h7b6447c_0  
bkcharts                  0.2                      py38_0  
blas                      1.0                         mkl  
bleach                    3.1.5                      py_0  
blosc                     1.19.0               hd408876_0  
bokeh                     2.1.1                    py38_0  
boto                      2.49.0                   py38_0  
bottleneck                1.3.2            py38heb32a55_1  
brotlipy                  0.7.0           py38h7b6447c_1000  
bzip2                     1.0.8                h7b6447c_0  
ca-certificates           2020.6.20            hecda079_0    conda-forge
cairo                     1.16.0            hcf35c78_1003    conda-forge
certifi                   2020.6.20        py38h32f6830_0    conda-forge
cffi                      1.14.0           py38hd463f26_0    conda-forge
chardet                   3.0.4                 py38_1003  
click                     7.1.2                      py_0  
cloudpickle               1.5.0                      py_0  
clyent                    1.2.2                    py38_1  
colorama                  0.4.3                      py_0  
conda                     4.8.3            py38h32f6830_2    conda-forge
conda-build               3.18.11                  py38_0  
conda-env                 2.6.0                         1  
conda-package-handling    1.6.1            py38h7b6447c_0  
conda-verify              3.4.2                      py_1  
contextlib2               0.6.0.post1                py_0  
cryptography              2.9.2            py38h1ba5d50_0  
curl                      7.71.1               hbc83047_1  
cycler                    0.10.0                   py38_0  
cython                    0.29.21          py38he6710b0_0  
cytoolz                   0.10.1           py38h7b6447c_0  
dask                      2.20.0                     py_0  
dask-core                 2.20.0                     py_0  
dbus                      1.13.16              hb2f20db_0  
decorator                 4.4.2                      py_0  
defusedxml                0.6.0                      py_0  
diff-match-patch          20200713                   py_0  
distributed               2.20.0                   py38_0  
docutils                  0.16                     py38_1  
entrypoints               0.3                      py38_0  
et_xmlfile                1.0.1                   py_1001  
expat                     2.2.9                he6710b0_2  
fastcache                 1.1.0            py38h7b6447c_0  
ffmpeg                    4.3                  h167e202_0    conda-forge
filelock                  3.0.12                     py_0  
flake8                    3.8.3                      py_0  
flask                     1.1.2                      py_0  
fontconfig                2.13.1            h86ecdb6_1001    conda-forge
freetype                  2.10.2               h5ab3b9f_0  
fribidi                   1.0.9                h7b6447c_0  
fsspec                    0.7.4                      py_0  
future                    0.18.2                   py38_1  
get_terminal_size         1.0.0                haa9412d_0  
gettext                   0.19.8.1          hc5be6a0_1002    conda-forge
gevent                    20.6.2           py38h7b6447c_0  
glib                      2.65.0               h6f030ca_0    conda-forge
glob2                     0.7                        py_0  
gmp                       6.2.0                he1b5a44_2    conda-forge
gmpy2                     2.0.8            py38hd5f6e3b_3  
gnutls                    3.6.13               h79a8f9a_0    conda-forge
graphite2                 1.3.14               h23475e2_0  
greenlet                  0.4.16           py38h7b6447c_0  
gst-plugins-base          1.14.5               h0935bb2_2    conda-forge
gstreamer                 1.14.5               h36ae1b5_2    conda-forge
h5py                      2.10.0          nompi_py38hfb01d0b_104    conda-forge
harfbuzz                  2.4.0                h9f30f68_3    conda-forge
hdf5                      1.10.6          nompi_h3c11f04_100    conda-forge
heapdict                  1.0.1                      py_0  
html5lib                  1.1                        py_0  
icu                       64.2                 he1b5a44_1    conda-forge
idna                      2.10                       py_0  
imageio                   2.9.0                      py_0  
imagesize                 1.2.0                      py_0  
importlib-metadata        1.7.0                    py38_0  
importlib_metadata        1.7.0                         0  
intel-openmp              2020.1                      217  
intervaltree              3.0.2                      py_1  
ipykernel                 5.3.2            py38h5ca1d4c_0  
ipython                   7.16.1           py38h5ca1d4c_0  
ipython_genutils          0.2.0                    py38_0  
ipywidgets                7.5.1                      py_0  
isort                     4.3.21                   py38_0  
itsdangerous              1.1.0                      py_0  
jasper                    1.900.1           h07fcdf6_1006    conda-forge
jbig                      2.1                  hdba287a_0  
jdcal                     1.4.1                      py_0  
jedi                      0.17.1                   py38_0  
jeepney                   0.4.3                      py_0  
jinja2                    2.11.2                     py_0  
joblib                    0.16.0                     py_0  
jpeg                      9d                   h516909a_0    conda-forge
json5                     0.9.5                      py_0  
jsonschema                3.2.0                    py38_0  
jupyter                   1.0.0                    py38_7  
jupyter_client            6.1.6                      py_0  
jupyter_console           6.1.0                      py_0  
jupyter_core              4.6.3                    py38_0  
jupyterlab                2.1.5                      py_0  
jupyterlab_server         1.2.0                      py_0  
keyring                   21.2.1                   py38_0  
kiwisolver                1.2.0            py38hfd86e86_0  
krb5                      1.18.2               h173b8e3_0  
lame                      3.100             h14c3975_1001    conda-forge
lazy-object-proxy         1.4.3            py38h7b6447c_0  
lcms2                     2.11                 h396b838_0  
ld_impl_linux-64          2.34                 h53a641e_7    conda-forge
libarchive                3.4.2                h62408e4_0  
libblas                   3.8.0                    16_mkl    conda-forge
libcblas                  3.8.0                    16_mkl    conda-forge
libclang                  9.0.1           default_hde54327_0    conda-forge
libcurl                   7.71.1               h20c2e04_1  
libedit                   3.1.20191231         h14c3975_1  
libffi                    3.2.1             he1b5a44_1007    conda-forge
libgcc-ng                 9.1.0                hdf63c60_0  
libgfortran-ng            7.3.0                hdf63c60_0  
libiconv                  1.15              h516909a_1006    conda-forge
liblapack                 3.8.0                    16_mkl    conda-forge
liblapacke                3.8.0                    16_mkl    conda-forge
liblief                   0.10.1               he6710b0_0  
libllvm9                  9.0.1                h4a3c616_1  
libopencv                 4.4.0                    py38_2    conda-forge
libpng                    1.6.37               hbc83047_0  
libsodium                 1.0.18               h7b6447c_0  
libspatialindex           1.9.3                he6710b0_0  
libssh2                   1.9.0                h1ba5d50_1  
libstdcxx-ng              9.1.0                hdf63c60_0  
libtiff                   4.1.0                h2733197_1  
libtool                   2.4.6                h7b6447c_5  
libuuid                   2.32.1            h14c3975_1000    conda-forge
libwebp-base              1.1.0                h516909a_3    conda-forge
libxcb                    1.14                 h7b6447c_0  
libxkbcommon              0.10.0               he1b5a44_0    conda-forge
libxml2                   2.9.10               hee79883_0    conda-forge
libxslt                   1.1.33               h31b3aaa_0    conda-forge
llvmlite                  0.33.0           py38hc6ec683_1  
locket                    0.2.0                    py38_1  
lxml                      4.5.2            py38hbb43d70_0    conda-forge
lz4-c                     1.9.2                he6710b0_0  
lzo                       2.10                 h7b6447c_2  
markupsafe                1.1.1            py38h7b6447c_0  
matplotlib                3.3.0                         1    conda-forge
matplotlib-base           3.3.0            py38h91b0d89_1    conda-forge
mccabe                    0.6.1                    py38_1  
mistune                   0.8.4           py38h7b6447c_1000  
mkl                       2020.1                      217  
mkl-service               2.3.0            py38he904b0f_0  
mkl_fft                   1.1.0            py38h23d657b_0  
mkl_random                1.1.1            py38h0573a6f_0  
mock                      4.0.2                      py_0  
more-itertools            8.4.0                      py_0  
mpc                       1.1.0                h10f8cd9_1  
mpfr                      4.0.2                hb69a4c5_1  
mpmath                    1.1.0                    py38_0  
msgpack-python            1.0.0            py38hfd86e86_1  
multipledispatch          0.6.0                    py38_0  
navigator-updater         0.2.1                    py38_0  
nbconvert                 5.6.1                    py38_0  
nbformat                  5.0.7                      py_0  
ncurses                   6.2                  he6710b0_1  
nettle                    3.4.1             h1bed415_1002    conda-forge
networkx                  2.4                        py_1  
nltk                      3.5                        py_0  
nose                      1.3.7                    py38_2  
notebook                  6.0.3                    py38_0  
nspr                      4.27                 he1b5a44_0    conda-forge
nss                       3.47                 he751ad9_0    conda-forge
numba                     0.50.1           py38h0573a6f_1  
numexpr                   2.7.1            py38h423224d_0  
numpy                     1.18.5           py38ha1c710e_0  
numpy-base                1.18.5           py38hde5b4d6_0  
numpydoc                  1.1.0                      py_0  
olefile                   0.46                       py_0  
opencv                    4.4.0                    py38_2    conda-forge
openh264                  2.1.1                h8b12597_0    conda-forge
openpyxl                  3.0.4                      py_0  
openssl                   1.1.1g               h516909a_0    conda-forge
packaging                 20.4                       py_0  
pandas                    1.0.5            py38h0573a6f_0  
pandoc                    2.10                          0  
pandocfilters             1.4.2                    py38_1  
pango                     1.45.3               hd140c19_0  
parso                     0.7.0                      py_0  
partd                     1.1.0                      py_0  
patchelf                  0.11                 he6710b0_0  
path                      13.1.0                   py38_0  
path.py                   12.4.0                        0  
pathlib2                  2.3.5                    py38_0  
pathtools                 0.1.2                      py_1  
patsy                     0.5.1                    py38_0  
pcre                      8.44                 he6710b0_0  
pep8                      1.7.1                    py38_0  
pexpect                   4.8.0                    py38_0  
pickleshare               0.7.5                 py38_1000  
pillow                    7.2.0            py38hb39fc2d_0  
pip                       20.1.1                   py38_1  
pixman                    0.38.0            h516909a_1003    conda-forge
pkginfo                   1.5.0.1                  py38_0  
pluggy                    0.13.1                   py38_0  
ply                       3.11                     py38_0  
prometheus_client         0.8.0                      py_0  
prompt-toolkit            3.0.5                      py_0  
prompt_toolkit            3.0.5                         0  
psutil                    5.7.0            py38h7b6447c_0  
ptyprocess                0.6.0                    py38_0  
py                        1.9.0                      py_0  
py-lief                   0.10.1           py38h403a769_0  
py-opencv                 4.4.0            py38h23f93f0_2    conda-forge
pycodestyle               2.6.0                      py_0  
pycosat                   0.6.3            py38h7b6447c_1  
pycparser                 2.20                       py_2  
pycurl                    7.43.0.5         py38h1ba5d50_0  
pydocstyle                5.0.2                      py_0  
pyflakes                  2.2.0                      py_0  
pygments                  2.6.1                      py_0  
pylint                    2.5.3                    py38_0  
pyodbc                    4.0.30           py38he6710b0_0  
pyopenssl                 19.1.0                     py_1  
pyparsing                 2.4.7                      py_0  
pyqt                      5.12.3           py38ha8c2ead_3    conda-forge
pyqt5-sip                 4.19.18                  pypi_0    pypi
pyqtchart                 5.12                     pypi_0    pypi
pyqtwebengine             5.12.1                   pypi_0    pypi
pyrsistent                0.16.0           py38h7b6447c_0  
pysocks                   1.7.1                    py38_0  
pytables                  3.6.1            py38h1b207d3_2    conda-forge
pytest                    5.4.3                    py38_0  
python                    3.8.5           h425cb1d_1_cpython    conda-forge
python-dateutil           2.8.1                      py_0  
python-jsonrpc-server     0.3.4                      py_1  
python-language-server    0.34.1                   py38_0  
python-libarchive-c       2.9                        py_0  
python_abi                3.8                      1_cp38    conda-forge
pytz                      2020.1                     py_0  
pywavelets                1.1.1            py38h7b6447c_0  
pyxdg                     0.26                       py_0  
pyyaml                    5.3.1            py38h7b6447c_1  
pyzmq                     19.0.1           py38he6710b0_1  
qdarkstyle                2.8.1                      py_0  
qt                        5.12.5               hd8c4c69_1    conda-forge
qtawesome                 0.7.2                      py_0  
qtconsole                 4.7.5                      py_0  
qtpy                      1.9.0                      py_0  
readline                  8.0                  h7b6447c_0  
regex                     2020.6.8         py38h7b6447c_0  
requests                  2.24.0                     py_0  
ripgrep                   11.0.2               he32d670_0  
rope                      0.17.0                     py_0  
rtree                     0.9.4                    py38_1  
ruamel_yaml               0.15.87          py38h7b6447c_1  
scikit-image              0.16.2           py38h0573a6f_0  
scikit-learn              0.23.1           py38h423224d_0  
scipy                     1.5.0            py38h0b6359f_0  
seaborn                   0.10.1                     py_0  
secretstorage             3.1.2                    py38_0  
send2trash                1.5.0                    py38_0  
setuptools                49.2.0                   py38_0  
simplegeneric             0.8.1                    py38_2  
singledispatch            3.4.0.3                  py38_0  
sip                       4.19.13          py38he6710b0_0  
six                       1.15.0                     py_0  
snappy                    1.1.8                he6710b0_0  
snowballstemmer           2.0.0                      py_0  
sortedcollections         1.2.1                      py_0  
sortedcontainers          2.2.2                      py_0  
soupsieve                 2.0.1                      py_0  
sphinx                    3.1.2                      py_0  
sphinxcontrib             1.0                      py38_1  
sphinxcontrib-applehelp   1.0.2                      py_0  
sphinxcontrib-devhelp     1.0.2                      py_0  
sphinxcontrib-htmlhelp    1.0.3                      py_0  
sphinxcontrib-jsmath      1.0.1                      py_0  
sphinxcontrib-qthelp      1.0.3                      py_0  
sphinxcontrib-serializinghtml 1.1.4                      py_0  
sphinxcontrib-websupport  1.2.3                      py_0  
spyder                    4.1.4                    py38_0  
spyder-kernels            1.9.2                    py38_0  
sqlalchemy                1.3.18           py38h7b6447c_0  
sqlite                    3.32.3               h62c20be_0  
statsmodels               0.11.1           py38h7b6447c_0  
sympy                     1.6.1                    py38_0  
tbb                       2020.0               hfd86e86_0  
tblib                     1.6.0                      py_0  
terminado                 0.8.3                    py38_0  
testpath                  0.4.4                      py_0  
threadpoolctl             2.1.0              pyh5ca1d4c_0  
tk                        8.6.10               hbc83047_0  
toml                      0.10.1                     py_0  
toolz                     0.10.0                     py_0  
tornado                   6.0.4            py38h7b6447c_1  
tqdm                      4.47.0                     py_0  
traitlets                 4.3.3                    py38_0  
typing_extensions         3.7.4.2                    py_0  
ujson                     1.35             py38h7b6447c_0  
unicodecsv                0.14.1                   py38_0  
unixodbc                  2.3.7                h14c3975_0  
urllib3                   1.25.9                     py_0  
watchdog                  0.10.3                   py38_0  
wcwidth                   0.2.5                      py_0  
webencodings              0.5.1                    py38_1  
werkzeug                  1.0.1                      py_0  
wheel                     0.34.2                   py38_0  
widgetsnbextension        3.5.1                    py38_0  
wrapt                     1.11.2           py38h7b6447c_0  
wurlitzer                 2.0.1                    py38_0  
x264                      1!152.20180806       h14c3975_0    conda-forge
xlrd                      1.2.0                      py_0  
xlsxwriter                1.2.9                      py_0  
xlwt                      1.3.0                    py38_0  
xmltodict                 0.12.0                     py_0  
xorg-kbproto              1.0.7             h14c3975_1002    conda-forge
xorg-libice               1.0.10               h516909a_0    conda-forge
xorg-libsm                1.2.3             h84519dc_1000    conda-forge
xorg-libx11               1.6.9                h516909a_0    conda-forge
xorg-libxext              1.3.4                h516909a_0    conda-forge
xorg-libxrender           0.9.10            h516909a_1002    conda-forge
xorg-renderproto          0.11.1            h14c3975_1002    conda-forge
xorg-xextproto            7.3.0             h14c3975_1002    conda-forge
xorg-xproto               7.0.31            h14c3975_1007    conda-forge
xz                        5.2.5                h7b6447c_0  
yaml                      0.2.5                h7b6447c_0  
yapf                      0.30.0                     py_0  
zeromq                    4.3.2                he6710b0_2  
zict                      2.0.0                      py_0  
zipp                      3.1.0                      py_0  
zlib                      1.2.11               h7b6447c_3  
zope                      1.0                      py38_1  
zope.event                4.4                      py38_0  
zope.interface            4.7.1            py38h7b6447c_0  
zstd                      1.4.5                h0b5b093_0  

I see opencv on the conda list but when I try to upload it to PyCharm I get an error like this:

Screenshot_20200725_041457

Here is the details about error:

Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed


Building graph of deps:   0%|          | 0/3 [00:00<?, ?it/s]
Examining opencv:   0%|          | 0/3 [00:00<?, ?it/s]      
Examining @/linux-64::__glibc==2.31=0:  33%|███▎      | 1/3 [00:00<00:01,  1.21it/s]
Examining @/linux-64::__glibc==2.31=0:  67%|██████▋   | 2/3 [00:00<00:00,  2.41it/s]
Examining python=3.8:  67%|██████▋   | 2/3 [00:00<00:00,  2.41it/s]                 
                                                                   

Determining conflicts:   0%|          | 0/3 [00:00<?, ?it/s]
Examining conflict for opencv python:   0%|          | 0/3 [00:00<?, ?it/s]
                                                                           
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - opencv -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']

Your python: python=3.8

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

Actually i couldn't figure out what is the problem in here, do I have problems with my python version? I have to downgrade to python 3.7 version?

It wants<3.8.0a0 but you are on 3.8.3, can't be of any further help - no knowledge of opencv.

But it is not a good idea to downgrade python, would a venv be an option?

Yeah, I don't want to downgrade python its not recommended. But I didnt find any solution about how to create venv for python 3.7

To create an environment with a specific version of Python:

conda create -n myenv python=3.7

from: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

2 Likes

thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by