No module named 'cv2' on Anaconda 3.8.3

10,817

Just open your command prompt with run as administrator. And try,

conda install -c conda-forge opencv

Share:
10,817

Related videos on Youtube

AmandaKamphoff
Author by

AmandaKamphoff

Updated on June 04, 2022

Comments

  • AmandaKamphoff
    AmandaKamphoff almost 2 years

    I just Installed the latest Anaconda 3.8.3 with conda version 4.8.3 right away after I installed Anaconda, I use Jupyter Notebook then type

    import cv2
    

    it says

    ModuleNotFoundError Traceback (most recent call last) in ----> 1 import cv2

    ModuleNotFoundError: No module named 'cv2'

    then based on : Cannot find module cv2 when using OpenCV

    someone suggested trying

    conda install -c https://conda.binstar.org/menpo opencv
    

    from the Anaconda Prompt

    prompt result

    Is there any other way to install cv2?

    • Sociopath
      Sociopath over 3 years
      Try pip install opencv in corresponding conda env
    • Nirmal
      Nirmal over 3 years
      conda install -c conda-forge opencv
    • AmandaKamphoff
      AmandaKamphoff over 3 years
      I tried pip install opencv and conda install -c conda-forge opencv and still failed with the same result @Sociopath and @nirmal
    • darthbith
      darthbith over 3 years
      You need to be an administrator to install packages with your current setup. You should launch the Anaconda Prompt in Administrator mode. If you don't know how to do that, it would probably be best to uninstall and re-install Anaconda, clicking the box to install it only for your own user account.
  • logankilpatrick
    logankilpatrick over 2 years
    This did the trick, though I don't understand why conda install opencv does not work.