How to install openCV on WSL + UBUNTU20.04 + python3.8 using Anaconda?

Viewed 1979

I am trying to install openCV on WSL+UBUNTU20.04 with python3.8. I am trying to install using miniconda without any success.

After searching over internet, it seems that openCV may not be supported on python3.8. If anyone has done this successfully, I would appreciate some help.

Update: Solved. Please check my answer.

1 Answers

Thanks to Christoph's suggestion, I decided to install using pip in the virtual enviornment of conda. I did the following:

  1. Run conda create -n env_name source activate env_name , where env_name is the name of your virtual environment.
  2. To install pip to my venv directory, I ran: conda install pip
  3. I went to the actual venv folder in anaconda directory. It should be somewhere like: /home/$USER/miniconda3/envs/env_name/
  4. I then installed new packages by doing /home/$USER/miniconda3/envs/env_name/bin/pip install opencv-python
Related