Tutorial to discuss steps on how to install Anaconda 5.3 and configure OpenCv3.2 in Anaconda 5.3 for python 3.6.
After completing these steps I am sure you can use anaconda/Python3 and OpenCv 3.2.
In office I was assigned a simple work in image processing which required extra modules of OpenCv in Python. It was simple task but I struggled a lot to configure python with opencv modules 😦 . After wasting my weekends I completed the task on time and came to know how easy it was 🙂 .
For Ubuntu 16.04 LTS (almost similar steps for Window 7).
1]. Download the Anaconda according to your system configuration from below link.
Run the below command for linux 64 bit system to download anaconda
2]. In ubuntu run the below command where you downloaded the anaconda installer file
Follow the anaconda installer press d and accept the license agreement
3]. Open the bashrc file and add the below line at the end of file and save it.
export PATH=”Path to your anaconda directory”/bin:$PATH
for me it is: export PATH=/home/lord/anaconda3/bin:$PATH
4]. source ~/.bashrc or close and reopen terminal again
Update conda and anaconda
5]. Run the below command to install opnecv3.2 in anaconda
conda install -c menpo opencv3
6]. Open the spyder app in terminal and import cv2 to verify. ( spyder app is good default IDE for python in conda environment )
Anaconda with opencv is installed 😀 😀 😀 😀 😀 Now data analysis & Machine learning can be performed in python.
Open spyder app and try import cv2. If no error we are done with opencv 😀
Below is all commands together
- curl -O https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh
- bash Anaconda3-5.2.0-Linux-x86_64.sh
- sudo gedit ~/.bashrc
- export PATH=/home/lord/anaconda3/bin:$PATH
- source ~/.bashrc
- conda update conda
- conda update anaconda
- conda install -c menpo opencv3
- spyder apps
That’s it 🙂 🙂 😀 😀 Open spyder and have fun . . . . .
Happy Learning Cheers